diff --git a/devTools/types/FC/facilities.d.ts b/devTools/types/FC/facilities.d.ts index 628dca392e2d0b768627f240bca0890b75dd1782..69ea41addb1bd05cd805fdedb7f37cb601a3479d 100644 --- a/devTools/types/FC/facilities.d.ts +++ b/devTools/types/FC/facilities.d.ts @@ -90,9 +90,9 @@ declare namespace FC { * Defaults to `"${facilityName} can support ${possible} slaves. It currently has ${current} slaves."`. */ desc?: string; - /** - * Any link to remove all slaves from the facility, if not the default. - */ + /** The maximum number of times the facility can be expanded, if any. */ + maximum?: number; + /** Any link to remove all slaves from the facility, if not the default. */ removeAll?: HTMLDivElement; /** * The assignment to assign the facility's manager to upon decommission. diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index 01567d806b7000cc2829c817baf782bd09691811..45bf1590287bfb643e7f394011cf4953e99332bc 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -617,7 +617,7 @@ App.Data.resetOnNGPlus = { masterSuite: 0, masterSuiteName: "the Master Suite", - // Nursery Subsection + // Nursery /** Counts the number of children the nursery can support */ nursery: 0, /** Counts the number of nannies the nursery can support */ @@ -637,6 +637,8 @@ App.Data.resetOnNGPlus = { nurseryMusclesSetting: 0, nurseryHormonesSetting: 0, nurseryName: "the Nursery", + nurserySex: false, + MatronIgnoresFlaws: false, /** Array of children in the Nursery */ cribs: [], cribsIndices: {}, diff --git a/src/004-base/facilityFramework.js b/src/004-base/facilityFramework.js index 8115de9bd59fc03fb2981624c467c1bdb808b0bc..f046369d7c972dda4e8a9286a8850a352075381b 100644 --- a/src/004-base/facilityFramework.js +++ b/src/004-base/facilityFramework.js @@ -144,13 +144,19 @@ App.Facilities.Facility = class { div.append(desc); if (!this.expand.unexpandable) { - App.UI.DOM.appendNewElement("div", div, App.UI.DOM.link(`Expand ${this.facility.name}`, () => { - cashX(forceNeg(cost), "capEx"); - V[this.facility.desc.baseName] += amount; // TODO: this will likely need to be changed in the future - V.PC.skill.engineering += .1; - - this.refresh(); - }, [], '', `Costs ${cashFormat(cost)} and increases the capacity of ${this.facility.name} by ${amount}.`), ['indent']); + if (V[this.facility.desc.baseName] < this.expand.maximum) { + App.UI.DOM.appendNewElement("div", div, App.UI.DOM.link(`Expand ${this.facility.name}`, () => { + cashX(forceNeg(cost), "capEx"); + V[this.facility.desc.baseName] += amount; // TODO: this will likely need to be changed in the future + V.PC.skill.engineering += .1; + + this.refresh(); + }, [], '', `Costs ${cashFormat(cost)} and increases the capacity of ${this.facility.name} by ${amount}.`), ['indent']); + } else { + App.UI.DOM.appendNewElement("div", div, App.UI.DOM.disabledLink(`Expand ${this.facility.name}`, [ + `${this.facility.nameCaps} can support a maximum of ${this.expand.maximum} slaves.`, + ])); + } } if (this.facility.totalEmployeesCount > 0) { diff --git a/src/005-passages/facilitiesPassages.js b/src/005-passages/facilitiesPassages.js index b1c4b98ffde82548da3cac954676f31aba769042..6ca2594cf215ac78064ab6f466697032ce866f1d 100644 --- a/src/005-passages/facilitiesPassages.js +++ b/src/005-passages/facilitiesPassages.js @@ -17,6 +17,8 @@ new App.DomPassage("Incubator", () => { return App.UI.incubator(); }, ["jump-to- new App.DomPassage("Master Suite", () => { return new App.Facilities.MasterSuite.masterSuite().render(); }, ["jump-to-safe", "jump-from-safe"]); +new App.DomPassage("Nursery", () => { return new App.Facilities.Nursery.nursery().render(); }, ["jump-to-safe", "jump-from-safe"]); + new App.DomPassage("Pit", () => { return new App.Facilities.Pit.pit().render(); }, ["jump-to-safe", "jump-from-safe"]); new App.DomPassage("Schoolroom", () => { return new App.Facilities.Schoolroom.schoolroom().render(); }, ["jump-to-safe", "jump-from-safe"]); diff --git a/src/facilities/nursery/nursery.js b/src/facilities/nursery/nursery.js new file mode 100644 index 0000000000000000000000000000000000000000..a03f4d60b00dc19b878f65a284049a29de1a26f3 --- /dev/null +++ b/src/facilities/nursery/nursery.js @@ -0,0 +1,769 @@ +App.Facilities.Nursery.nursery = class Nursery extends App.Facilities.Facility { + constructor() { + const nursery = App.Entity.facilities.nursery; + const decommissionHandler = () => { + V.nursery = 0; + V.nurseryDecoration = "standard"; + V.nurseryNannies = 0; + V.nannyInfluence = 0; + V.cribs = []; + }; + + super( + nursery, + decommissionHandler, + ); + + V.nextButton = "Back to Main"; + V.nextLink = "Main"; + V.encyclopedia = "Nursery"; + } + + /** @returns {string} */ + get intro() { + // TODO: add in effects based on number of children hosted + const text = []; + + text.push(this.facility.nameCaps, this.decorations); + + if (this.facility.hostedSlaves > 2) { + text.push(`${this.facility.nameCaps} is bustling with activity. Nannies are busily moving about, feeding babies and changing diapers.`); + } else if (this.facility.hostedSlaves > 0) { + text.push(`${this.facility.nameCaps} is working steadily. Nannies are moving about, cleaning up and feeding hungry children.`); + } else if (S.Matron) { + text.push(`${S.Matron.slaveName} is alone in ${this.facility.name}, and keeps the place clean and looks after the children ${getPronouns(S.Matron).himself}.`); + } else { + text.push(`${this.facility.nameCaps} is empty and quiet.`); + } + + return text.join(' '); + } + + /** @returns {string} */ + get decorations() { + /** @type {FC.Facilities.Decoration} */ + const FS = { + "Roman Revivalist": `is run with the Roman dream in mind, with wide open windows exposing the babies to the elements. The sleek marble halls bring a sense of serenity and duty as wet nurses wander the halls.`, + "Neo-Imperialist": `is modeled as an ultra high-tech nursing area, with omnipresent advanced machinery monitoring every heartbeat of the babies within, the soft glow of machines pulsating against the banners of your family crest lining the walls.`, + "Aztec Revivalist": `is lined head to toe in illustrious Aztec gold. Tiny but notable subscripts lay in plaques to honor the mothers who died giving birth, the children of said mothers, alive or dead, are tirelessly watched over to tend to their every need.`, + "Egyptian Revivalist": `is decorated by sleek, sandstone tablets, golden statues, and even grander Egyptian wall sculptures, many of them depicting the conception, birth, and raising of a child. Each babe is reverently wrapped in linen covers as they drift to sleep to the stories of mighty pharaohs and prosperous palaces.`, + "Edo Revivalist": `is minimalist in nature, but the errant paintings of cherry blossoms and vibrant Japanese maples give a certain peaceful air as the caretakers do their duties.`, + "Arabian Revivalist": `is decorated wall to wall with splendorous carvings and religious Hamsas meant to protect the fostering children.`, + "Chinese Revivalist": `is ripe with Chinese spirit. Depictions of colorful dragons and oriental designs grace the halls, rooms, and cribs of the babies who reside inside.`, + "Chattel Religionist": `is decorated with childish religious cartoons and artistic tapestries of slaves bowing in submission, their themes always subsiding varying degrees of sexual worship. The caretakers that wander the halls obediently wear their habits, and never waste a moment to tenderly lull the children to sleep with stories of their prophet.`, + "Degradationist": `is bare and sullen. The cries of the neglected children destined for slavery trying to find comfort in their burlap coverings echo the halls, while those that await freedom are raised among luxury and are taught to look down on their less fortunate peers.`, + "Repopulationist": `is designed to be very open and public; a showing testament to your arcology's repopulation efforts. For those old enough to support them, they are strapped with big, but body warming, empathy bellies as to remind them of their destiny.`, + "Eugenics": `is of utmost quality without a single pleasantry missing — if the parents are of the elite blood of course. While there are rare stragglers of unworthy genes, the child populace overall is pampered with warm rooms and plentiful small toys.`, + "Asset Expansionist": `is not so much decorated as it is intelligently staffed. Every passerby, slave or not, burns the image of their jiggling asses and huge, wobbling tits into the minds of the children.`, + "Transformation Fetishist": `is kept simple and clean. From their toys down to the nursemaids, the babies are exposed to the wonders of body transformation whenever possible.`, + "Gender Radicalist": `is decorated by cheery cartoon depictions of slaves of many shapes, sizes, and genitals, all of them undeniably feminine. The elated smiles and yips of the nurses getting reamed constantly instill the appreciation of nice, pliable buttholes.`, + "Gender Fundamentalist": `is simply designed and painted with soft feminine colors. The staff heavily encourage the children to play dress up and house, subtly sculpting their minds to proper gender norms and properly put them in line if they try to do otherwise.`, + "Physical Idealist": `is furnished with kiddy health books and posters; their caretakers making painstakingly sure that the importance is drilled into their heads at a young age. Their food is often littered with vitamins and supplements to keep the children growing strong.`, + "Supremacist": `is designed and structured to give those of ${V.arcologies[0].FSSupremacistRace} ethnicity the limelight of the nursery, while the others stay sectioned off and neglected to the world.`, + "Subjugationist": `is made to foster and raise the young children of ${V.arcologies[0].FSSubjugationistRace} ethnicity. They are reminded of their place with every failure and are encouraged to submissively follow their stereotypes at a ripe young age.`, + "Paternalist": `is well-stocked and by Paternalistic customs, constantly swaddle the children with love and attention. With the warm colors and sound of child laughter, to the untrained eye, the children actually seem free.`, + "Pastoralist": `is decorated to make the children grow up thinking that a life focused on breast milk, cum, and other human secretions are part of the norm. The milky tits swaying above their cow-patterned cribs certainly help with that.`, + "Maturity Preferentialist": `decorations remind the kids to respect those curvy and mature. The older nurserymaids are always flattered whenever the children try to act like adults and take care of the younger toddlers for them.`, + "Youth Preferentialist": `is making young children the center of attention, their rooms supplied with plenty of toys, blankets, and surrogate mothers at their beck and call.`, + "Body Purist": `is decorated to be very clean cut and sterilized with perfect corners and curves; symbolic of the human figure. Nursery maids are encouraged to show off their natural assets to show the children what the appropriate body should be.`, + "Slimness Enthusiast": `constantly encourages the kids to try and keep their slim and cute physiques. They are given perfectly metered meals to make this possible.`, // TODO: tie this in to food system + "Hedonistic": `would make any toddler drool in amazement. Meals and naps every other hour, cribs stalked with toys and blankets, and plush slaves carry them to and fro without preamble. A delicious layer of baby fat is the ideal figure of a baby, and they couldn't be happier.`, + "Intellectual Dependency": ``, // TODO: + "Slave Professionalism": ``, // TODO: + "Petite Admiration": `has large photos and paintings on the walls depicting small, petite children enjoying ${this.facility.name}'s amenities and having fun together.`, + "Statuesque Glorification": `has large photos and paintings on the walls depicting tall children enjoying ${this.facility.name}'s amenities and having fun together.`, + "standard": `is as comfortable and child-friendly as it needs to be. They have everything they need to grow into a proper slave.`, + "": ``, + }; + + const res = FS[V.nurseryDecoration]; + + if (!res) { + throw new Error(`Unknown V.nurseryDecoration value of '${V.nurseryDecoration}' found in decorations().`); + } + + return res; + } + + /** @returns {FC.Facilities.Expand} */ + get expand() { + const slaves = this.facility.hostedSlaves; + const nannies = numberWithPluralOne(V.nurseryNannies, 'nanny', 'nannies'); + + return { + amount: 1, + desc: `${this.facility.nameCaps} has room to support ${num(V.nurseryNannies)} ${nannies}. There ${slaves === 1 ? `is` : `are`} currently ${nannies} taking care of ${numberWithPlural(V.nurseryChildren, 'child', 'children')}.`, + maximum: 5, + }; + } + + /** @returns {FC.IUpgrade[]} */ + get upgrades() { + return [ + { + property: "nurseryWeight", + tiers: [ + { + value: 0, + upgraded: 1, + text: `${this.facility.nameCaps} has only the most basic monitoring systems available.`, + link: `Upgrade the monitoring system`, + cost: 1000 * V.upgradeMultiplierArcology, + handler: () => V.PC.skill.engineering += 0.1, + note: ` and will increase upkeep costs`, + }, + { + value: 1, + text: `The monitoring systems have been upgraded and allow for monitoring children's food intakes.`, + }, + ], + }, + { + property: "nurseryMuscles", + tiers: [ + { + value: 0, + upgraded: 1, + text: `There is space in one part of ${this.facility.name} where a playground and different toys and equipment could be installed to keep children fit and healthy.`, + link: `Install a playground`, + cost: 1000 * V.upgradeMultiplierArcology, + handler: () => V.PC.skill.engineering += 0.1, + note: ` and will increase upkeep costs`, + }, + { + value: 1, + text: `A playground and various toys and equipment have been installed in one part of ${this.facility.name}.`, + }, + ], + }, + { + property: "nurseryHormones", + tiers: [ + { + value: 0, + upgraded: 1, + text: `${this.facility.nameCaps} doesn't have any sort of artificial hormones designed for children.`, + link: `Invest in purpose-built hormones`, + cost: 1000 * V.upgradeMultiplierArcology, + handler: () => V.PC.skill.engineering += 0.1, + note: ` and will increase upkeep costs`, + }, + { + value: 1, + text: `Hormones designed specifically for children have been developed for ${this.facility.name}.`, + }, + ], + }, + ]; + } + + /** @returns {FC.Facilities.Rule[]}*/ + get rules() { + return [ + { + property: "MatronIgnoresFlaws", + prereqs: [ + () => !!S.Matron, + ], + options: [ + { + get text() { return `${S.Matron.slaveName} has been instructed to ignore flaws in the nannies serving under ${getPronouns(S.Matron).him}.`; }, + link: `Ignore flaws`, + value: 1, + }, + { + get text() { return `${S.Matron.slaveName} will attempt to fix flaws in nannies serving under ${getPronouns(S.Matron).him}.`; }, + link: `Fix flaws`, + value: 0, + }, + ], + }, + { + property: "nurserySex", + prereqs: [ + () => !!V.extremeUnderage, + ], + options: [ + { + get text() { return `${capFirstChar(V.nurseryName)} staff are not allowed to molest the children.`; }, + link: `Forbid`, + value: 0, + }, + { + get text() { return `${capFirstChar(V.nurseryName)} staff are allowed to molest the children.`; }, + link: `Allow`, + value: 1, + }, + ], + }, + // TODO: really not happy with most of these – rework these + { + property: "nurseryWeightSetting", + prereqs: [ + () => !!V.nurseryWeight, + ], + options: [ + { + get text() { return `Food intake is not being managed; children may end up malnourished.`; }, + link: `Don't manage`, + value: 0, + }, + { + get text() { return `Food intake is being managed; children will be raised at a healthy weight.`; }, + link: `Manage`, + value: 1, + }, + ], + }, + { + property: "nurseryMusclesSetting", + prereqs: [ + () => !!V.nurseryMuscles, + ], + options: [ + { + get text() { return `Children are not getting any exercise; they may end up quite weak and frail.`; }, + link: `Don't manage`, + value: 0, + }, + { + get text() { return `Exercise is being managed; children will be raised with average fitness.`; }, + link: `Manage`, + value: 1, + }, + ], + }, + { + property: "nurseryHormonesSetting", + prereqs: [ + () => !!V.nurseryHormones, + ], + options: [ + { + get text() { return `Artificial hormones are not being given; children will undergo normal puberty.`; }, + link: `Don't manage`, + value: 0, + }, + { + get text() { return `Artificial hormone levels are being managed; children may experience precocious puberty.`; }, + link: `Manage`, + value: 1, + }, + ], + }, + ]; + } + + /** @returns {HTMLDivElement} */ + get mothers() { + const div = document.createElement("div"); + + const text = []; + + let childrenReserved = 0; + + text.push(`Reserve an eligible mother-to-be's child to be placed in a room upon birth. Of ${V.nursery} rooms, ${numberWithPlural(V.nursery - V.nurseryChildren, 'is', 'are')} unoccupied. Of those, ${numberWithPlural(FetusGlobalReserveCount("nursery"), 'room is', 'rooms are')} reserved.`); + + App.Events.addNode(div, text); + + const refreshDiv = document.createElement("div"); + refreshDiv.append(content()); + div.append(refreshDiv); + + return div; + + function content() { + const div = document.createElement("div"); + + div.append( + sort(), + mothers(), + ); + + return div; + } + + function sort() { + const div = document.createElement("div"); + + const sorts = []; + let sort = 'Unsorted'; + + sorts.push(App.UI.DOM.link(`Sort by Name`, () => { + sort = 'Name'; + sortNurseryPossiblesByName(); + })); + sorts.push(App.UI.DOM.link(`Sort by Reserved Nursery Spots`, () => { + sort = 'Reserved Nursery Spots'; + sortNurseryPossiblesByReservedSpots(); + })); + sorts.push(App.UI.DOM.link(`Sort by Pregnancy Week`, () => { + sort = 'Pregnancy Week'; + sortNurseryPossiblesByPregnancyWeek(); + })); + sorts.push(App.UI.DOM.link(`Sort by Number of Children`, () => { + sort = 'Number of Children'; + sortNurseryPossiblesByPregnancyCount(); + })); + + div.append( + `Sorting: ${sort}`, + App.UI.DOM.generateLinksStrip(sorts), + ); + + return div; + } + + function mothers() { + const el = new DocumentFragment(); + let r = []; + let eligibility = 0; + let linkArray; + const reservedChildren = FetusGlobalReserveCount("incubator"); + const incubatorSlaves = V.incubator.tanks.length; + const freeTanks = V.incubator.capacity - incubatorSlaves; + r.push(`Reserve an eligible mother-to-be's child to be placed in a tank upon birth. Of ${V.incubator.capacity} tanks, ${freeTanks}`); + if (freeTanks === 1) { + r.push(`is`); + } else { + r.push(`are`); + } + r.push(`unoccupied. Of those, ${reservedChildren}`); + if (reservedChildren === 1) { + r.push(`tank is`); + } else { + r.push(`tanks are`); + } + r.push(`reserved.`); + App.Events.addNode(el, r, "div"); + + const sortingOptions = new Map([ + ["Name", "data-name"], + ["Reserved Incubator Spots", "data-reserved-spots"], + ["Pregnancy Week", "data-preg-week"], + ["Number of Children", "data-preg-count"], + ]); + + if (V.slaves.length > 0) { + /** + * @param {Map<string, string>} sortingOptions + */ + const sortingBarFunc = function(sortingOptions) { + const el = new DocumentFragment(); + App.UI.DOM.appendNewElement("span", el, "Sorting: ", "note"); + const linkArray = []; + for (const [title, attr] of sortingOptions) { + if (V.sortIncubatorList === title) { + linkArray.push(App.UI.DOM.makeElement("span", title, "bold")); + } else { + linkArray.push( + App.UI.DOM.link( + title, + () => { + V.sortIncubatorList = title; + sortBy(attr); + jQuery(sortingBar).empty().append(sortingBarFunc(sortingOptions)); + } + ) + ); + } + } + el.append(App.UI.DOM.generateLinksStrip(linkArray)); + return el; + }; + + const sortingBar = document.createElement("div"); + sortingBar.classList.add("incubator-underscore"); + + V.sortIncubatorList = V.sortIncubatorList || 'Unsorted'; + sortingBar.append(sortingBarFunc(sortingOptions)); + el.append(sortingBar); + } + + const qlIncubator = document.createElement("div"); + for (const slave of V.slaves) { + if (slave.preg > 0 && slave.pregKnown === 1 && slave.eggType === "human") { + const r = []; + const reserveDisallowed = (slave.assignment === "work in the dairy" && V.dairyPregSetting > 0) || slave.assignment === "be your agent" || slave.assignment === "live with your agent"; + if (!reserveDisallowed) { + const { + His, his + } = getPronouns(slave); + const freeTanks = V.incubator.capacity - incubatorSlaves; + const WL = slave.womb.length; + const reservedIncubator = WombReserveCount(slave, "incubator"); + const reservedNursery = WombReserveCount(slave, "nursery"); + const momEl = document.createElement("p"); + momEl.id = "slave-" + slave.ID; + momEl.classList.add("possible"); + + momEl.setAttribute("data-preg-count", slave.womb.length.toString()); + momEl.setAttribute("data-reserved-spots", reservedIncubator.toString()); + momEl.setAttribute("data-preg-week", slave.pregWeek.toString()); + momEl.setAttribute("data-name", SlaveFullName(slave)); + + linkArray = []; + const choices = document.createElement("div"); + choices.classList.add("choices"); + r.push(App.UI.DOM.slaveDescriptionDialog(slave)); + r.push(`is ${slave.pregWeek} ${(slave.pregWeek === 1) ? `week` : `weeks`} pregnant with`); + if (slave.pregSource === 0 || slave.preg <= 5) { + r.push(`someone's${(slave.preg <= 5) ? `, though it is too early to tell whose,` : ``}`); + } else if (slave.pregSource === -1) { + r.push(`your`); + } else if (slave.pregSource === -2) { + r.push(`a citizen's`); + } else if (slave.pregSource === -3) { + r.push(`your Master's`); + } else if (slave.pregSource === -4) { + r.push(`another arcology owner's`); + } else if (slave.pregSource === -5) { + r.push(`your client's`); + } else if (slave.pregSource === -6) { + r.push(`the Societal Elite's`); + } else if (slave.pregSource === -7) { + r.push(`the lab's`); + } else if (slave.pregSource === -9) { + r.push(`the Futanari Sisters'`); + } else { + const father = getSlave(slave.pregSource); + if (father) { + r.push(`${father.slaveName}'s`); + } else if (WL === 1) { + r.push("a"); + } + } + if (WL > 1) { + r.push(`${WL} babies.`); + } else { + r.push(`baby.`); + } + if (reservedIncubator > 0) { + childrenReserved = 1; + if (WL === 1) { + r.push(`${His} child`); + } else if (reservedIncubator < WL) { + r.push(`${reservedIncubator} of ${his} children`); + } else if (WL === 2) { + r.push(`Both of ${his} children`); + } else { + r.push(`All ${reservedIncubator} of ${his} children`); + } + r.push(`will be placed in ${V.incubator.name}.`); + if ((reservedIncubator + reservedNursery < WL) && (reservedChildren < freeTanks)) { + if (V.pregnancyMonitoringUpgrade === 1) { + linkArray.push( + App.UI.DOM.link( + `Inspect pregnancy`, + () => { + V.AS = slave.ID; + }, + [], + `Analyze Pregnancy` + ) + ); + } + linkArray.push( + App.UI.DOM.link( + `Keep another child`, + () => { + WombAddToGenericReserve(slave, 'incubator', 1); + refresh(); + } + ) + ); + if (reservedIncubator > 0) { + linkArray.push( + App.UI.DOM.link( + `Keep one less child`, + () => { + WombCleanGenericReserve(slave, 'incubator', 1); + refresh(); + } + ) + ); + } + if (reservedIncubator > 1) { + linkArray.push( + App.UI.DOM.link( + `Keep none of ${his} children`, + () => { + WombCleanGenericReserve(slave, 'incubator', 9999); + refresh(); + } + ) + ); + } + if ((reservedChildren + WL - reservedIncubator) <= freeTanks) { + linkArray.push( + App.UI.DOM.link( + `Keep the rest of ${his} children`, + () => { + WombAddToGenericReserve(slave, 'incubator', 9999); + refresh(); + } + ) + ); + } + } else if ((reservedIncubator === WL) || (reservedChildren === freeTanks) || (reservedIncubator + reservedNursery === WL)) { + if (V.pregnancyMonitoringUpgrade === 1) { + linkArray.push( + App.UI.DOM.link( + `Inspect pregnancy`, + () => { + V.AS = slave.ID; + }, + [], + `Analyze Pregnancy` + ) + ); + } + linkArray.push( + App.UI.DOM.link( + `Keep one less child`, + () => { + WombCleanGenericReserve(slave, 'incubator', 1); + refresh(); + } + ) + ); + if (reservedIncubator > 1) { + linkArray.push( + App.UI.DOM.link( + `Keep none of ${his} children`, + () => { + WombCleanGenericReserve(slave, 'incubator', 9999); + refresh(); + } + ) + ); + } + } + } else if (reservedChildren < freeTanks) { + if (WL - reservedNursery === 0) { + r.push(App.UI.DOM.makeElement("span", `${His} children are already reserved for ${V.nurseryName}`, "note")); + if (V.pregnancyMonitoringUpgrade === 1) { + linkArray.push( + App.UI.DOM.link( + `Inspect pregnancy`, + () => { + V.AS = slave.ID; + }, + [], + `Analyze Pregnancy` + ) + ); + } + linkArray.push( + App.UI.DOM.link( + `Keep ${his} ${((WL > 1) ? "children" : "child")} here instead`, + () => { + WombChangeReserveType(slave, 'nursery', 'incubator'); + refresh(); + } + ) + ); + } else { + r.push(`You have `); + if (freeTanks === 1) { + r.push(`an <span class="lime">available aging tank.</span>`); + } else { + r.push(`<span class="lime">available aging tanks.</span>`); + } + if (V.pregnancyMonitoringUpgrade === 1) { + if (V.pregnancyMonitoringUpgrade === 1) { + linkArray.push( + App.UI.DOM.link( + `Inspect pregnancy`, + () => { + V.AS = slave.ID; + }, + [], + `Analyze Pregnancy` + ) + ); + } + } + linkArray.push( + App.UI.DOM.link( + `Keep ${(WL > 1) ? "a" : "the"} child`, + () => { + WombAddToGenericReserve(slave, 'incubator', 1); + refresh(); + } + ) + ); + if ((WL > 1) && (reservedChildren + WL - reservedIncubator) <= freeTanks) { + linkArray.push( + App.UI.DOM.link( + `Keep all of ${his} children`, + () => { + WombAddToGenericReserve(slave, 'incubator', 9999); + refresh(); + } + ) + ); + } + } + } else if (reservedChildren === freeTanks) { + if (V.pregnancyMonitoringUpgrade === 1) { + linkArray.push( + App.UI.DOM.link( + `Inspect pregnancy`, + () => { + V.AS = slave.ID; + }, + [], + `Analyze Pregnancy` + ) + ); + } + const noRoom = new DocumentFragment(); + noRoom.append(`You have `); + App.UI.DOM.appendNewElement("span", noRoom, `no room for ${his} offspring.`, "red"); + linkArray.push(noRoom); + } + eligibility = 1; + + App.Events.addNode(momEl, r, "div"); + choices.append(App.UI.DOM.generateLinksStrip(linkArray)); + momEl.append(choices); + qlIncubator.append(momEl); + } + } + } + sortByPreviousSort(); + el.append(qlIncubator); + if (eligibility === 0) { + App.UI.DOM.appendNewElement("div", el, `You have no pregnant slaves bearing eligible children.`, "note"); + } + + if (reservedChildren !== 0 || childrenReserved === 1) { // the oops I made it go negative somehow button + App.UI.DOM.appendNewElement( + "div", + el, + App.UI.DOM.link( + "Clear all reserved children", + () => { + for (const slave of V.slaves) { + if (WombReserveCount(slave, "incubator") !== 0) { + WombCleanGenericReserve(slave, 'incubator', 9999); + } + } + WombCleanGenericReserve(V.PC, 'incubator', 9999); + refresh(); + } + ) + ); + } + return el; + + function refresh() { + App.UI.reload(); + } + + function sortBy(attrName) { + let sortedIncubatorPossibles = $(qlIncubator).children('p.possible').detach(); + sortedIncubatorPossibles = sortDomObjects(sortedIncubatorPossibles, attrName); + $(sortedIncubatorPossibles).appendTo(qlIncubator); + } + + function sortByPreviousSort() { + const sortAttr = sortingOptions.get(V.sortIncubatorList); + if (sortAttr) { + sortBy(sortAttr); + } + } + } + } + + /** @returns {HTMLDivElement} */ + get children() { + const div = document.createElement("div"); + + div.append(App.Facilities.Nursery.childList()); + + return div; + } + + /** @returns {HTMLDivElement} */ + get targetAge() { + const div = document.createElement("div"); + + const links = [ + App.UI.DOM.link(`Minimum Legal Age`, () => { + V.targetAgeNursery = V.minimumSlaveAge; + + App.UI.reload(); + }, [], '', `Will not be applied to rooms in use.`), + App.UI.DOM.link(`Average Age of Fertility`, () => { + V.targetAgeNursery = V.fertilityAge; + + App.UI.reload(); + }, [], '', `Will not be applied to rooms in use.`), + App.UI.DOM.link(`Average Age of Potency`, () => { + V.targetAgeNursery = V.potencyAge; + + App.UI.reload(); + }, [], '', `Will not be applied to rooms in use.`), + App.UI.DOM.link(`Legal Adulthood`, () => { + V.targetAgeNursery = 18; + + App.UI.reload(); + }, [], '', `Will not be applied to rooms in use.`), + ]; + + div.append( + `Target age for release: `, + App.UI.DOM.makeTextBox(V.targetAgeNursery, target => { + V.targetAgeNursery = target; + + App.UI.reload(); + }) + ); + + App.UI.DOM.appendNewElement("div", div, App.UI.DOM.generateLinksStrip(links), ['indent']); + + return div; + } + + /** @returns {HTMLDivElement} */ + get rooms() { + const div = document.createElement("div"); + + const cost = Math.trunc(5000 * V.upgradeMultiplierArcology); + const links = []; + + div.append(`It can support ${numberWithPlural(V.nursery, 'child', 'children')}. There ${numberWithPlural(V.nurseryChildren, 'is', 'are')} currently ${numberWithPlural(V.nurseryChildren, 'room')} in use in ${this.facility.name}.`); + + links.push(App.UI.DOM.link(`Add room for another 5 children`, () => { + cashX(forceNeg(cost), "nursery"); + V.nursery += 5; + + App.UI.reload(); + }, [], '', `Costs ${cashFormat(cost)} and will increase upkeep costs.`)); + + if (V.nursery > 1 && FetusGlobalReserveCount("nursery") < V.nursery - V.nurseryChildren) { + links.push(App.UI.DOM.link(`Remove a room`, () => { + cashX(forceNeg(cost / 5), "nursery"); + V.nursery -= 5; + + App.UI.reload(); + }, [], '', `Costs ${cashFormat(cost / 5)} and will decrease upkeep costs.`)); + } + + App.UI.DOM.appendNewElement("div", div, App.UI.DOM.generateLinksStrip(links), ['indent']); + + return div; + } + + /** @returns {HTMLDivElement[]} */ + get customNodes() { + return [ + this.mothers, + this.children, + this.targetAge, + this.rooms, + ]; + } +}; diff --git a/src/facilities/nursery/nursery.tw b/src/facilities/nursery/nursery.tw deleted file mode 100644 index af80183f2710526ecbd22b4a3f0139ff92aedad6..0000000000000000000000000000000000000000 --- a/src/facilities/nursery/nursery.tw +++ /dev/null @@ -1,405 +0,0 @@ -:: Nursery [nobr jump-to-safe jump-from-safe] - -<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Nursery", $encyclopedia = "Nursery">> -<<set $targetAgeNursery = Number($targetAgeNursery) || $minimumSlaveAge>> -<<set $targetAgeNursery = Math.clamp($targetAgeNursery, $minimumSlaveAge, 42)>> - -<<set $nurseryChildren = $cribs.length, _freecribs = $nursery - $nurseryChildren, _NL = App.Entity.facilities.nursery.employeesIDs().size, _SL = $slaves.length, _eligibility = 0, _reservedChildren = FetusGlobalReserveCount("incubator"), _reservedChildrenNursery = FetusGlobalReserveCount("nursery")>> -<p class="scene-intro"> - <<set _nurseryNameCaps = capFirstChar($nurseryName)>> - _nurseryNameCaps - <<switch $nurseryDecoration>> - <<case "Roman Revivalist">> - is run with the Roman dream in mind, with wide open windows exposing the babies to the elements. The sleek marble halls bring a sense of serenity and duty as wet nurses wander the halls. - <<case "Neo-Imperialist">> - is modeled as an ultra high-tech nursing area, with omnipresent advanced machinery monitoring every heartbeat of the babies within, the soft glow of machines pulsating against the banners of your family crest lining the walls. - <<case "Aztec Revivalist">> - is lined head to toe in illustrious Aztec gold. Tiny but notable subscripts lay in plaques to honor the mothers who died giving birth, the children of said mothers, alive or dead, are tirelessly watched over to tend to their every need. - <<case "Egyptian Revivalist">> - is decorated by sleek, sandstone tablets, golden statues, and even grander Egyptian wall sculptures, many of them depicting the conception, birth, and raising of a child. Each babe is reverently wrapped in linen covers as they drift to sleep to the stories of mighty pharaohs and prosperous palaces. - <<case "Edo Revivalist">> - is minimalistic in nature, but the errant paintings of cherry blossoms and vibrant Japanese maples give a certain peaceful air as the caretakers do their duties. - <<case "Arabian Revivalist">> - is decorated wall to wall with splendorous carvings and religious Hamsas meant to protect the fostering children. - <<case "Chinese Revivalist">> - is ripe with Chinese spirit. Depictions of colorful dragons and oriental designs grace the halls, rooms, and cribs of the babies who reside inside. - <<case "Chattel Religionist">> - is decorated with childish religious cartoons and artistic tapestries of slaves bowing in submission, their themes always subsiding varying degrees of sexual worship. The caretakers that wander the halls obediently wear their habits, and never waste a moment to tenderly lull the children to sleep with stories of their prophet. - <<case "Degradationist">> - is bare and sullen. The cries of the neglected children destined for slavery trying to find comfort in their burlap coverings echo the halls, while those that await freedom are raised among luxury and are taught to look down on their less fortunate peers. - <<case "Repopulationist">> - is designed to be very open and public; a showing testament to your arcology's repopulation efforts. For those old enough to support them, they are strapped with big, but body warming, empathy bellies as to remind them of their destiny. - <<case "Eugenics">> - is of utmost quality without a single pleasantry missing — if the parents are of the elite blood of course. While there are rare stragglers of unworthy genes, the child populace overall is pampered with warm rooms and plentiful small toys. - <<case "Asset Expansionist">> - is not so much decorated as it is intelligently staffed. Every passerby, slave or not, burns the image of their jiggling asses and huge, wobbling tits into the minds of the children. - <<case "Transformation Fetishist">> - is kept simple and clean. From their toys down to the nursemaids, the babies are exposed to the wonders of body transformation whenever possible. - <<case "Gender Radicalist">> - is decorated by cheery cartoon depictions of slaves of many shapes, sizes, and genitals, all of them undeniably feminine. The elated smiles and yips of the nurses getting reamed constantly instill the appreciation of nice, pliable buttholes. - <<case "Gender Fundamentalist">> - is simply designed and painted with soft feminine colors. The staff heavily encourage the children to play dress up and house, subtly sculpting their minds to proper gender norms and properly put them in line if they try to do otherwise. - <<case "Physical Idealist">> - is furnished with kiddy health books and posters; their caretakers making painstakingly sure that the importance is drilled into their heads at a young age. Their food is often littered with vitamins and supplements to keep the children growing strong. - <<case "Supremacist">> - is designed and structured to give those of $arcologies[0].FSSupremacistRace ethnicity the limelight of the nursery, while the others stay sectioned off and neglected to the world. - <<case "Subjugationist">> - is made to foster and raise the young children of $arcologies[0].FSSubjugationistRace ethnicity. They are reminded of their place with every failure and are encouraged to submissively follow their stereotypes at a ripe young age. - <<case "Paternalist">> - is well-stocked and by Paternalistic customs, constantly swaddle the children with love and attention. With the warm colors and sound of child laughter, to the untrained eye, the children actually seem free. - <<case "Pastoralist">> - is decorated to make the children grow up thinking that a life focused on breast milk, cum, and other human secretions are part of the norm. The milky tits swaying above their cow-patterned cribs certainly help with that. - <<case "Maturity Preferentialist">> - decorations remind the kids to respect those curvy and mature. The older nurserymaids are always flattered whenever the children try to act like adults and take care of the younger toddlers for them. - <<case "Youth Preferentialist">> - is making young children the center of attention, their rooms supplied with plenty of toys, blankets, and surrogate mothers at their beck and call. - <<case "Body Purist">> - is decorated to be very clean cut and sterilized with perfect corners and curves; symbolic of the human figure. Nursery maids are encouraged to show off their natural assets to show the children what the appropriate body should be. - <<case "Slimness Enthusiast">> - constantly encourages the kids to try and keep their slim and cute physiques. They are given perfectly metered meals to make this possible. /* TODO: tie this in to food system */ - <<case "Hedonistic">> - would make any toddler drool in amazement. Meals and naps every other hour, cribs stalked with toys and blankets, and plush slaves carry them to and fro without preamble. A delicious layer of baby fat is the ideal figure of a baby, and they couldn't be happier. - <<case "Intellectual Dependency">> - /* TODO: */ - <<case "Slave Professionalism">> - /* TODO: */ - <<case "Petite Admiration">> - has large photos and paintings on the walls depicting small, petite children enjoying $nurseryName's amenities and having fun together. - <<case "Statuesque Glorification">> - has large photos and paintings on the walls depicting tall children enjoying $nurseryName's amenities and having fun together. /* TODO: rewrite so it's not so similar? */ - <<default>> - is as comfortable and child-friendly as it needs to be. They have everything they need to grow into a proper slave. - <</switch>> - - <<if $MatronID>> - <<setLocalPronouns _S.Matron>> - <</if>> - - <<if _NL > 2>> - _nurseryNameCaps is bustling with activity. Nannies are busily moving about, feeding babies and changing diapers. - <<elseif _NL > 0>> - _nurseryNameCaps is working steadily. Nannies are moving about, cleaning up and feeding hungry children. - <<set $nannyInfluence = 1>> - <<elseif $MatronID>> - _S.Matron.slaveName is alone in $nurseryName, and keeps the place clean and looks after the children $himself. - <<elseif (_NL <= 0) && ($nurseryChildren <= 0)>> - _nurseryNameCaps is empty and quiet. - <div class="choices" style="font-style:normal"> - <<link "Decommission the Nursery" "Main">> - <<set $nursery = 0, $nurseryNannies = 0, $nannyInfluence = 0, $nurseryDecoration = "standard", $cribs = [], _reservedChildrenNursery = 0>> - <<for _i = 0; _i < $slaves.length; _i++>> - <<run WombCleanGenericReserve($slaves[_i], "nursery", 9999)>> - <</for>> - <</link>> - </div> - <</if>> -</p> - -<div class="tab-bar"> - /* <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'nannies')" id="tab nannies">Nannies</button> */ - <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'pregnant-slaves')" id="tab pregnant-slaves">Pregnant Slaves</button> - <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'children')" id="tab children">Children</button> -</div> - -/* -<div id="nannies" class="tab-content"> - <div id="content"> - */ - <<set _Tmult0 = Math.trunc($nurseryNannies*1000*$upgradeMultiplierArcology)>> - <br>It can support $nurseryNannies <<if $nurseryNannies != 1>>nannies<<else>>nanny<</if>>. - There <<if _NL == 1>>is<<else>>are<</if>> _NL <<if _NL != 1>>nannies<<else>>nanny<</if>> in $nurseryName. - <<if $nurseryChildren > 0 && _NL < 1 && (!_S.Matron)>> - <div class="note"> - You must have a Matron or at least one nanny to be able to influence the children's upbringing - </div> - <</if>> - <<if $nurseryNannies < 5>> - <div class="choices"> - [[Expand the nursery|Nursery][cashX(forceNeg(_Tmult0), "capEx"), $nurseryNannies += 1, $PC.skill.engineering += .1]] - <span class="note"> - Costs <<print cashFormat(_Tmult0)>> and will increase upkeep costs - </span> - </div> - <<else>> - <span class="note"> - _nurseryNameCaps can support a maximum of 5 slaves - </span> - <</if>> - - <div class="choices"> - <<if _NL > 0>> - <<includeDOM removeFacilityWorkers(App.Entity.facilities.nursery, "rest", "rest")>> - <</if>> - </div> - - <div> - <<if _S.Matron>> - <<if $MatronIgnoresFlaws != 1>> - _S.Matron.slaveName will attempt to fix flaws in nannies serving under $him. - <div class="choices"> - [[Ignore flaws|Nursery][$MatronIgnoresFlaws = 1]] - </div> - <<else>> - _S.Matron.slaveName has been instructed to ignore flaws in the nannies serving under $him. - <div class="choices"> - [[Fix flaws|Nursery][$MatronIgnoresFlaws = 0]] - </div> - <</if>> - <</if>> - </div> - - <p> - <<includeDOM App.UI.SlaveList.stdFacilityPage(App.Entity.facilities.nursery)>> - </p> - /* - </div> -</div> -*/ - -<div id="pregnant-slaves" class="tab-content"> - <div id="content"> - <br><br> - Reserve an eligible mother-to-be's child to be placed in a room upon birth. Of $nursery rooms, <<print _freecribs>> <<if _freecribs == 1>>is<<else>>are<</if>> unoccupied. Of those, _reservedChildrenNursery room<<if _reservedChildrenNursery == 1>> is<<else>>s are<</if>> reserved. - - <<if (0 < _SL)>> - <<set $sortNurseryList = $sortNurseryList || 'Unsorted'>> - <br> - <span class="note"> - Sorting: - </span> - ''<span id="ql-nursery-sort">$sortNurseryList</span>.'' - <<link "Sort by Name">> - <<set $sortNurseryList = 'Name'>> - <<replace "#ql-nursery-sort">>$sortNurseryList<</replace>> - <<script>> - sortNurseryPossiblesByName(); - <</script>> - <</link>> | - <<link "Sort by Reserved Nursery Spots">> - <<set $sortNurseryList = 'Reserved Nursery Spots'>> - <<replace "#ql-nursery-sort">>$sortNurseryList<</replace>> - <<script>> - sortNurseryPossiblesByReservedSpots(); - <</script>> - <</link>> | - <<link "Sort by Pregnancy Week">> - <<set $sortNurseryList = 'Pregnancy Week'>> - <<replace "#ql-nursery-sort">>$sortNurseryList<</replace>> - <<script>> - sortNurseryPossiblesByPregnancyWeek(); - <</script>> - <</link>> | - <<link "Sort by Number of Children">> - <<set $sortNurseryList = 'Number of Children'>> - <<replace "#ql-nursery-sort">>$sortNurseryList<</replace>> - <<script>> - sortNurseryPossiblesByPregnancyCount(); - <</script>> - <</link>> - <br> - <</if>> - <div id="ql-nursery"> - <<for _u = 0; _u < _SL; _u++>> - <<setLocalPronouns $slaves[_u]>> - <<if $slaves[_u].preg > 0 && $slaves[_u].broodmother == 0 && $slaves[_u].pregKnown == 1 && $slaves[_u].eggType == "human">> - <<if $slaves[_u].assignment == "work in the dairy" && $dairyPregSetting > 0>> - <<else>> - <<set _slaveId = "slave-" + $slaves[_u].ID>> - <<set _WL = $slaves[_u].womb.length>> - <<set _reservedNursery = WombReserveCount($slaves[_u], "nursery")>> - <<set _reservedIncubator = WombReserveCount($slaves[_u], "incubator")>> - <<set _pregWeek = $slaves[_u].pregWeek>> - <<set _slaveName = SlaveFullName($slaves[_u])>> - <div class="possible" @id="_slaveId" @data-preg-count="_WL" @data-reserved-spots="_reservedNursery" @data-preg-week="_pregWeek" @data-name="_slaveName"> - <<print "[[_slaveName|Slave Interact][$AS = $slaves[" + _u + "].ID, $nextLink = passage()]]">> is <<= numberWithPluralOne($slaves[_u].pregWeek, "week")>> pregnant with - <<if $slaves[_u].pregSource == 0 || $slaves[_u].preg <= 5>>someone's<<if $slaves[_u].preg <= 5>>, though it is too early to tell whose,<</if>> - <<elseif $slaves[_u].pregSource == -1>>your - <<elseif $slaves[_u].pregSource == -2>>a citizen's - <<elseif $slaves[_u].pregSource == -3>>your Master's - <<elseif $slaves[_u].pregSource == -4>>another arcology owner's - <<elseif $slaves[_u].pregSource == -5>>your client's - <<elseif $slaves[_u].pregSource == -6>>the Societal Elite's - <<elseif $slaves[_u].pregSource == -7>>the lab's - <<elseif $slaves[_u].pregSource == -9>>the Futanari Sisters' - <<else>> - <<set _t = $slaveIndices[$slaves[_u].pregSource]>> - <<if def _t>> - <<print $slaves[_t].slaveName>>'s - <</if>> - <</if>> - <<if _WL > 1>>_WL babies<<else>>baby<</if>>. - <<if _reservedNursery > 0>> - <<set _childrenReservedNursery = 1>> - <<if _WL == 1>> - $His child will be placed in $nurseryName. - <<elseif _reservedNursery < _WL>> - _reservedNursery of $his children will be placed in $nurseryName. - <<elseif _WL == 2>> - Both of $his children will be placed in $nurseryName. - <<else>> - All _reservedNursery of $his children will be placed in $nurseryName. - <</if>> - <<if (_reservedIncubator + _reservedNursery < _WL) && (_reservedChildrenNursery < _freecribs)>> - <br> - <<print "[[Keep another child|Nursery][WombAddToGenericReserve($slaves[" + _u + "], 'nursery', 1)]]">> - <<if _reservedNursery > 0>> - | <<print "[[Keep one less child|Nursery][WombCleanGenericReserve($slaves[" + _u + "], 'nursery', 1)]]">> - <</if>> - <<if _reservedNursery > 1>> - | <<print "[[Keep none of " + $his + " children|Nursery][WombCleanGenericReserve($slaves[" + _u + "], 'nursery', 9999)]]">> - <</if>> - <<if (_reservedChildrenNursery + _WL - _reservedNursery) <= _freecribs>> - | <<print "[[Keep the rest of " + $his + " children|Nursery][WombAddToGenericReserve($slaves[" + _u + "], 'nursery', 9999)]]">> - <</if>> - <<elseif (_reservedNursery == _WL) || (_reservedChildrenNursery == _freecribs) || (_reservedIncubator + _reservedNursery == _WL)>> - <br> - <<print "[[Keep one less child|Nursery][WombCleanGenericReserve($slaves[" + _u + "], 'nursery', 1)]]">> - <<if _reservedNursery > 1>> - | <<print "[[Keep none of " + $his + " children|Nursery][WombCleanGenericReserve($slaves[" + _u + "], 'nursery', 9999)]]">> - <</if>> - <</if>> - <<elseif (_reservedChildrenNursery < _freecribs) && (_freecribs > _WL)>> - <<if _WL - _reservedIncubator == 0>> - <span class="note"> - $His children are already reserved for <<= $incubator.name>> - </span> - <br> - <<print "[[Keep " + $his + " " + ((_WL > 1) ? "children" : "child") + " here instead|Nursery][WombChangeReserveType($slaves[" + _u + "], 'incubator', 'nursery')]]">> - <<else>> - You have <<if _freecribs == 1>>an<</if>> @@.lime;available room<<if _freecribs > 1>>s<</if>>.@@ - <br> - <<print "[[Keep "+ ((_WL > 1) ? "a" : "the") +" child|Nursery][WombAddToGenericReserve($slaves[" + _u + "], 'nursery', 1)]]">> - <<if (_WL > 1) && (_reservedChildrenNursery + _WL - _reservedNursery) <= _freecribs>> - | <<print "[[Keep all of " + $his + " children|Nursery][WombAddToGenericReserve($slaves[" + _u + "], 'nursery', 9999)]]">> - <</if>> - <</if>> - <<elseif _reservedChildrenNursery == _freecribs>> - <br> - You have @@.red;no room for $his offspring.@@ - <</if>> - <<set _eligibility = 1>> - </div> - <</if>> - <</if>> - <</for>> - </div> - <<script>> - $('div#ql-nursery').ready(sortNurseryPossiblesByPreviousSort); - <</script>> - </div> -</div> - -<div id="children" class="tab-content"> - <div id="content"> - <p> - Target age for release: <<textbox "$targetAgeNursery" $targetAgeNursery "Nursery">> - [[Minimum Legal Age|Nursery][$targetAgeNursery = $minimumSlaveAge]] | - [[Average Age of Fertility|Nursery][$targetAgeNursery = $fertilityAge]] | - [[Average Age of Potency|Nursery][$targetAgeNursery = $potencyAge]] | - [[Legal Adulthood|Nursery][$targetAgeNursery = 18]] - <span class="note"> - Setting will not be applied to rooms in use. - </span> - </p> - - It can support $nursery child<<if $nursery != 1>>ren<</if>>. There <<if $nurseryChildren == 1>>is<<else>>are<</if>> currently $nurseryChildren room<<if $nurseryChildren != 1>>s<</if>> in use in $nurseryName. - <<if $nursery < 50>> - <div class="choices"> - [[Add another room|Nursery][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "nursery"), $nursery += 5]] - <span class="note"> - Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>> and will increase upkeep costs - </span> - <<if _freecribs == 0>> - All of the rooms are currently occupied by growing children. - <</if>> - </div> - <<else>> - <span class="note"> - _nurseryNameCaps can support a maximum of 50 children - </span> - <</if>> - - <<if $nursery > 1 && _reservedChildrenNursery < _freecribs>> - <div class="choices"> - [[Remove a room|Nursery][cashX(forceNeg(Math.trunc(1000*$upgradeMultiplierArcology)), "nursery"), $nursery -= 5]] - <span class="note"> - Costs <<print cashFormat(Math.trunc(1000*$upgradeMultiplierArcology))>> and will reduce upkeep costs - </span> - </div> - <</if>> - - <br> - <h3>Rules</h3> - <hr style="margin:0"> - <<if $extremeUnderage>> - <<if $nurserySex>> - _nurseryNameCaps staff are ''allowed'' to molest the children. [[Forbid|Nursery][$nurserySex = 0]] - <<else>> - _nurseryNameCaps staff are ''not allowed'' to molest the children. [[Allow|Nursery][$nurserySex = 1]] - <</if>> - <</if>> - <br> - - <<if $nurseryWeight>> - <<if $nurseryWeightSetting>> - Food intake ''is'' being managed; children will be raised at a healthy weight. - [[End managing|Nursery][$nurseryWeightSetting = 0]] - <<else>> - Food intake ''is not'' being managed; children may end up malnourished. - [[Begin managing|Nursery][$nurseryWeightSetting = 1]] - <</if>> - <<else>> - The amount of food the children eat ''is not'' being monitored, meaning they may end up becoming malnourished. - [[Monitor the amount of food the children eat|Nursery][cashX(forceNeg(Math.trunc(1000*$upgradeMultiplierArcology)), "nursery"), $nurseryWeight = 1]] - <span class="note"> - Requires a Matron or at least one nanny and costs <<print cashFormat(Math.trunc(1000*$upgradeMultiplierArcology))>> and will increase upkeep costs - </span> - <</if>> - <br> - - <<if $nurseryMuscles>> - <<if $nurseryMusclesSetting>> - Exercise ''is'' being managed; children will be raised with average fitness. - [[End managing|Nursery][$nurseryMusclesSetting = 0]] - <<else>> - Children ''are not'' getting any exercise; they may end up quite weak and frail. - [[Begin managing|Nursery][$nurseryMusclesSetting = 1]] - <</if>> - <<else>> - The children ''are not'' getting any exercise, meaning they will likely end up becoming fairly weak and frail. - [[Allow the children to remain active|Nursery][cashX(forceNeg(Math.trunc(1000*$upgradeMultiplierArcology)), "nursery"), $nurseryMuscles = 1]] - <span class="note"> - Requires a Matron or at least one nanny and costs <<print cashFormat(Math.trunc(1000*$upgradeMultiplierArcology))>> and will increase upkeep costs - </span> - <</if>> - <br> - - <<if $nurseryUpgradeHormones>> - <<if $nurseryHormonesSetting>> - Artificial hormone levels ''are'' being managed; children may experience precocious puberty. - [[Disable|Nursery][$nurseryHormonesSetting = 0]] - <<else>> - Artificial hormones ''are not'' being given; children will undergo normal puberty. - [[Activate|Nursery][$nurseryHormonesSetting = 1]] - <</if>> - <<else>> - The children ''are not'' being given any artificial hormones. - [[Give the children growth hormones|Nursery][cashX(forceNeg(Math.trunc(1000*$upgradeMultiplierArcology)), "nursery"), $nurseryUpgradeHormones = 1, $nurseryHormonesSetting = 0]] - <span class="note"> - Requires a Matron or at least one nanny and costs <<print cashFormat(Math.trunc(1000*$upgradeMultiplierArcology))>> and will increase upkeep costs - </span> - <</if>> - <br> - - <<includeDOM App.Facilities.Nursery.childList()>> - </div> -</div> - -<p> - Rename $nurseryName: <<textbox "$nurseryName" $nurseryName "Nursery">> - <span class="note"> - Use a noun or similar short phrase - </span> -</p> - -<<run App.UI.SlaveList.ScrollPosition.restore()>>