From 95b312d19924e611b573905131d4855910178d3d Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Sun, 23 Feb 2020 22:25:36 -0500 Subject: [PATCH] generateRows --- src/js/itemAvailability.js | 6 +- src/js/slaveInteract.js | 2347 ++++++++++++++++------------ src/uncategorized/slaveInteract.tw | 124 +- 3 files changed, 1317 insertions(+), 1160 deletions(-) diff --git a/src/js/itemAvailability.js b/src/js/itemAvailability.js index 92a3f257d06..3c53b337c0d 100644 --- a/src/js/itemAvailability.js +++ b/src/js/itemAvailability.js @@ -549,8 +549,8 @@ window.addProsthetic = function(slave, prosthetic) { if (limb > 0) { let p = { id: prosthetic, - arm: { left: new App.Entity.LimbState(), right: new App.Entity.LimbState() }, - leg: { left: new App.Entity.LimbState(), right: new App.Entity.LimbState() } + arm: {left: new App.Entity.LimbState(), right: new App.Entity.LimbState()}, + leg: {left: new App.Entity.LimbState(), right: new App.Entity.LimbState()} }; p.arm.left.type = limb; p.arm.right.type = limb; @@ -558,7 +558,7 @@ window.addProsthetic = function(slave, prosthetic) { p.leg.right.type = limb; slave.readyProsthetics.push(p); } else { - slave.readyProsthetics.push({ id: prosthetic }); + slave.readyProsthetics.push({id: prosthetic}); } } }; diff --git a/src/js/slaveInteract.js b/src/js/slaveInteract.js index df05cf9f9c2..775e50bae41 100644 --- a/src/js/slaveInteract.js +++ b/src/js/slaveInteract.js @@ -1,3 +1,4 @@ +/* eslint-disable no-unused-vars */ // TODO: remove after testing App.UI.SlaveInteract = {}; App.UI.SlaveInteract.fucktoyPref = function(slave) { @@ -7,14 +8,14 @@ App.UI.SlaveInteract.fucktoyPref = function(slave) { let links = []; if ((slave.assignment === "please you") || (slave.assignment === "serve in the master suite") || (slave.assignment === "be your Concubine")) { - let storyLabel = document.createElement('span'); + let storyLabel = document.createElement('span'); storyLabel.className = "story-label"; storyLabel.textContent = `Fucktoy use preference:`; el.appendChild(storyLabel); el.append(` `); - let hole = document.createElement('span'); + let hole = document.createElement('span'); hole.style.fontWeight = "bold"; hole.textContent = `${slave.toyHole}. `; el.appendChild(hole); @@ -127,7 +128,7 @@ App.UI.SlaveInteract.assignmentBlock = function(blockId, slave) { `Stay on this assignment for another month`, () => { slave.sentence += 4, - App.UI.SlaveInteract.assignmentBlock(blockId, slave); + App.UI.SlaveInteract.assignmentBlock(blockId, slave); }, ) ); @@ -139,16 +140,22 @@ App.UI.SlaveInteract.assignmentBlock = function(blockId, slave) { App.UI.SlaveInteract.drugs = function(slave) { let el = document.createElement('div'); - const - { - // eslint-disable-next-line no-unused-vars - he, him, his, hers, himself, boy, He, His - } = getPronouns(slave); + const { + // eslint-disable-next-line no-unused-vars + he, + him, + his, + hers, + himself, + boy, + He, + His + } = getPronouns(slave); const drugOptions = []; const drugLevelOptions = []; if (slave.drugs !== "no drugs"){ - drugLevelOptions.push({text: `None`, drug: `no drugs`}); + drugLevelOptions.push({text: `None`, updateSlave:{drugs: `no drugs`}}); } if (slave.indentureRestrictions < 2) { if ( @@ -159,23 +166,23 @@ App.UI.SlaveInteract.drugs = function(slave) { ) { switch (slave.drugs) { case "intensive breast injections": - drugLevelOptions.push({text: `Moderate`, drug: `breast injections`}); + drugLevelOptions.push({text: `Moderate`, updateSlave:{drugs: `breast injections`}}); break; case "intensive butt injections": - drugLevelOptions.push({text: `Moderate`, drug: `butt injections`}); + drugLevelOptions.push({text: `Moderate`, updateSlave:{drugs: `butt injections`}}); break; case "intensive penis enhancement": - drugLevelOptions.push({text: `Moderate`, drug: `penis enhancement`}); + drugLevelOptions.push({text: `Moderate`, updateSlave:{drugs: `penis enhancement`}}); break; case "intensive testicle enhancement": - drugLevelOptions.push({text: `Moderate`, drug: `testicle enhancement`}); + drugLevelOptions.push({text: `Moderate`, updateSlave:{drugs: `testicle enhancement`}}); break; } } else if (slave.drugs === "breast injections" || slave.drugs === "butt injections" || slave.drugs === "penis enhancement" || slave.drugs === "testicle enhancement") { - drugLevelOptions.push({text: `Intensify`, drug: "intensive " + slave.drugs}); + drugLevelOptions.push({text: `Intensify`, updateSlave:{drugs: "intensive " + slave.drugs}}); } if (slave.intelligence > -100 && slave.indentureRestrictions < 1) { - drugOptions.push({text: `Psychosuppressants`, drug: `psychosuppressants`}); + drugOptions.push({text: `Psychosuppressants`, updateSlave:{drugs: `psychosuppressants`}}); } else if (slave.intelligence > -100) { drugOptions.push({text: `Psychosuppressants`, disabled: `Cannot suppress indentured slave`}); } else if (slave.indentureRestrictions < 1) { @@ -185,86 +192,86 @@ App.UI.SlaveInteract.drugs = function(slave) { } if (V.arcologies[0].FSSlaveProfessionalismResearch === 1) { if (canImproveIntelligence(slave)) { - drugOptions.push({text: `Psychostimulants`, drug: `psychostimulants`}); + drugOptions.push({text: `Psychostimulants`, updateSlave:{drugs: `psychostimulants`}}); } else { drugOptions.push({text: `Psychostimulants`, disabled: `Cannot improve intelligence`}); } } if (slave.boobs < 48000) { - drugOptions.push({text: `Breasts`, drug: `breast injections`}); + drugOptions.push({text: `Breasts`, updateSlave:{drugs: `breast injections`}}); } else { drugOptions.push({text: `Breasts`, disabled: `Boobs are too large`}); } if (V.arcologies[0].FSAssetExpansionistResearch === 1) { if (slave.boobs < 25000) { - drugOptions.push({text: `Hyper-Breasts`, drug: `hyper breast injections`}); + drugOptions.push({text: `Hyper-Breasts`, updateSlave:{drugs: `hyper breast injections`}}); } else { drugOptions.push({text: `Hyper Breasts`, disabled: `Boobs are too large`}); } } if (V.arcologies[0].FSSlimnessEnthusiastResearch === 1) { if ((slave.boobs - slave.boobsImplant - slave.boobsMilk) > 100) { - drugOptions.push({text: `Breast reducers`, drug: `breast redistributors`}); + drugOptions.push({text: `Breast reducers`, updateSlave:{drugs: `breast redistributors`}}); } else { drugOptions.push({text: `Breast reducers`, disabled: `Boobs are too small`}); } if (slave.nipples === "huge" || slave.nipples === "puffy" || slave.nipples === "cute") { - drugOptions.push({text: `Nipple reducers`, drug: `nipple atrophiers`}); + drugOptions.push({text: `Nipple reducers`, updateSlave:{drugs: `nipple atrophiers`}}); } else { drugOptions.push({text: `Nipple reducers`, disabled: `Nipples are ${slave.nipples}`}); } } if (slave.butt < 9) { - drugOptions.push({text: `Buttocks`, drug: `butt injections`}); + drugOptions.push({text: `Buttocks`, updateSlave:{drugs: `butt injections`}}); } else { drugOptions.push({text: `Buttocks`, disabled: `Butt is too large`}); } if (V.arcologies[0].FSAssetExpansionistResearch === 1) { if (slave.butt < 20) { - drugOptions.push({text: `Hyper-Buttocks`, drug: `hyper butt injections`}); + drugOptions.push({text: `Hyper-Buttocks`, updateSlave:{drugs: `hyper butt injections`}}); } else { drugOptions.push({text: `Hyper Buttocks`, disabled: `Butt is too large`}); } } if (V.arcologies[0].FSSlimnessEnthusiastResearch === 1) { if (slave.butt - slave.buttImplant > 0) { - drugOptions.push({text: `Butt reducers`, drug: `butt redistributors`}); + drugOptions.push({text: `Butt reducers`, updateSlave:{drugs: `butt redistributors`}}); } else { drugOptions.push({text: `Butt reducers`, disabled: `Butt is too small`}); } } if (slave.lips <= 95 || (slave.lips <= 85 && V.seeExtreme !== 1)) { - drugOptions.push({text: `Lips`, drug: `lip injections`}); + drugOptions.push({text: `Lips`, updateSlave:{drugs: `lip injections`}}); } else { drugOptions.push({text: `Lips`, disabled: `Lips are too large`}); } if (V.arcologies[0].FSSlimnessEnthusiastResearch === 1) { - if (slave.lips-slave.lipsImplant > 0) { - drugOptions.push({text: `Lip reducers`, drug: `lip atrophiers`}); + if (slave.lips - slave.lipsImplant > 0) { + drugOptions.push({text: `Lip reducers`, updateSlave:{drugs: `lip atrophiers`}}); } else { drugOptions.push({text: `Lip reducers`, disabled: `Lips are too small`}); } } if (V.growthStim === 1) { if (canImproveHeight(slave)) { - drugOptions.push({text: `Growth Stimulants`, drug: `growth stimulants`}); + drugOptions.push({text: `Growth Stimulants`, updateSlave:{drugs: `growth stimulants`}}); } else { drugOptions.push({text: `Growth Stimulants`, disabled: `Cannot increase height further`}); } } - drugOptions.push({text: `Fertility`, drug: `fertility drugs`}); + drugOptions.push({text: `Fertility`, updateSlave:{drugs: `fertility drugs`}}); if (V.seeHyperPreg === 1 && slave.indentureRestrictions < 1 && V.superFertilityDrugs === 1 && (slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) { - drugOptions.push({text: `Fertility+`, drug: `super fertility drugs`}); + drugOptions.push({text: `Fertility+`, updateSlave:{drugs: `super fertility drugs`}}); } if (slave.dick > 0) { if (slave.dick < 10) { - drugOptions.push({text: `Penis enhancement`, drug: `penis enhancement`}); + drugOptions.push({text: `Penis enhancement`, updateSlave:{drugs: `penis enhancement`}}); } else { drugOptions.push({text: `Penis enhancement`, disabled: `Dick is too large`}); } } else { if (slave.clit < 5) { - drugOptions.push({text: `Clitoris enhancement`, drug: `penis enhancement`}); + drugOptions.push({text: `Clitoris enhancement`, updateSlave:{drugs: `penis enhancement`}}); } else { drugOptions.push({text: `Clitoris enhancement`, disabled: `Clit is too large`}); } @@ -272,13 +279,13 @@ App.UI.SlaveInteract.drugs = function(slave) { if (V.arcologies[0].FSAssetExpansionistResearch === 1) { if (slave.dick > 0) { if (slave.dick < 31) { - drugOptions.push({text: `Hyper penis enhancement`, drug: `hyper penis enhancement`}); + drugOptions.push({text: `Hyper penis enhancement`, updateSlave:{drugs: `hyper penis enhancement`}}); } else { drugOptions.push({text: `Hyper penis enhancement`, disabled: `Dick is too large`}); } } else { if (slave.clit < 5) { - drugOptions.push({text: `Hyper clitoris enhancement`, drug: `penis enhancement`}); + drugOptions.push({text: `Hyper clitoris enhancement`, updateSlave:{drugs: `penis enhancement`}}); } else { drugOptions.push({text: `Hyper clitoris enhancement`, disabled: `Clit is too large`}); } @@ -286,60 +293,60 @@ App.UI.SlaveInteract.drugs = function(slave) { } if (V.arcologies[0].FSSlimnessEnthusiastResearch === 1) { if (slave.dick > 1) { - drugOptions.push({text: `Penis reducers`, drug: `penis atrophiers`}); + drugOptions.push({text: `Penis reducers`, updateSlave:{drugs: `penis atrophiers`}}); } else if (slave.dick === 1) { drugOptions.push({text: `Penis reducers`, disabled: `Dick is already at minimum size`}); } } if (slave.dick > 0 && slave.dick < 11 && !canAchieveErection(slave) && slave.chastityPenis !== 1) { - drugOptions.push({text: `Erectile dysfunction circumvention`, drug: `priapism agents`}); + drugOptions.push({text: `Erectile dysfunction circumvention`, updateSlave:{drugs: `priapism agents`}}); } if (slave.balls > 0) { - drugOptions.push({text: `Testicle enhancement`, drug: `testicle enhancement`}); + drugOptions.push({text: `Testicle enhancement`, updateSlave:{drugs: `testicle enhancement`}}); if (V.arcologies[0].FSAssetExpansionistResearch === 1) { - drugOptions.push({text: `Hyper testicle enhancement`, drug: `hyper testicle enhancement`}); + drugOptions.push({text: `Hyper testicle enhancement`, updateSlave:{drugs: `hyper testicle enhancement`}}); } } if (V.arcologies[0].FSSlimnessEnthusiastResearch === 1) { if (slave.balls > 1) { - drugOptions.push({text: `Testicle reducers`, drug: `testicle atrophiers`}); + drugOptions.push({text: `Testicle reducers`, updateSlave:{drugs: `testicle atrophiers`}}); } else if (slave.balls === 1) { drugOptions.push({text: `Testicle reducers`, disabled: `Balls are already at minimum size`}); } if (slave.clit > 0) { - drugOptions.push({text: `Clitoris reducers`, drug: `clitoris atrophiers`}); + drugOptions.push({text: `Clitoris reducers`, updateSlave:{drugs: `clitoris atrophiers`}}); } if (slave.labia > 0) { - drugOptions.push({text: `Labia reducers`, drug: `labia atrophiers`}); + drugOptions.push({text: `Labia reducers`, updateSlave:{drugs: `labia atrophiers`}}); } } if (V.arcologies[0].FSYouthPreferentialistResearch === 1) { if (slave.visualAge > 18) { - drugOptions.push({text: `Anti-aging cream`, drug: `anti-aging cream`}); + drugOptions.push({text: `Anti-aging cream`, updateSlave:{drugs: `anti-aging cream`}}); } else { drugOptions.push({text: `Anti-aging cream`, disabled: `Slave already looks young enough`}); } } - drugOptions.push({text: `Steroids`, drug: `steroids`}); + drugOptions.push({text: `Steroids`, updateSlave:{drugs: `steroids`}}); if (V.arcologies[0].FSSlimnessEnthusiastResearch === 1) { if (slave.weight > -95) { - drugOptions.push({text: `Weight loss pills`, drug: `appetite suppressors`}); + drugOptions.push({text: `Weight loss pills`, updateSlave:{drugs: `appetite suppressors`}}); } else { drugOptions.push({text: `Weight loss pills`, disabled: `Slave is already at low weight`}); } } if (V.precociousPuberty === 1 && V.pubertyHormones === 1 && (slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) { if ((slave.ovaries === 1 || slave.mpreg === 1) && slave.pubertyXX === 0) { - drugOptions.push({text: `Female hormone injections`, drug: `female hormone injections`}); + drugOptions.push({text: `Female hormone injections`, updateSlave:{drugs: `female hormone injections`}}); } if (slave.balls > 0 && slave.pubertyXY === 0) { - drugOptions.push({text: `Male hormone injections`, drug: `male hormone injections`}); + drugOptions.push({text: `Male hormone injections`, updateSlave:{drugs: `male hormone injections`}}); } } - drugOptions.push({text: `Hormone enhancers`, drug: `hormone enhancers`}); - drugOptions.push({text: `Hormone blockers`, drug: `hormone blockers`}); + drugOptions.push({text: `Hormone enhancers`, updateSlave:{drugs: `hormone enhancers`}}); + drugOptions.push({text: `Hormone blockers`, updateSlave:{drugs: `hormone blockers`}}); if (slave.boobs > 250 && slave.boobShape !== "saggy" && V.purchasedSagBGone === 1) { - drugOptions.push({text: `Sag-B-Gone breast lifting cream`, drug: `sag-B-gone`}); + drugOptions.push({text: `Sag-B-Gone breast lifting cream`, updateSlave:{drugs: `sag-B-gone`}}); } } @@ -349,63 +356,14 @@ App.UI.SlaveInteract.drugs = function(slave) { chosenDrug.textContent = `${capFirstChar(slave.drugs)} `; chosenDrug.style.fontWeight = "bold"; title.append(chosenDrug); - title.appendChild(generateRows(drugLevelOptions)); + title.appendChild(App.UI.SlaveInteract.generateRows(drugLevelOptions, slave)); el.append(title); let drugLinks = document.createElement('div'); - drugLinks.appendChild(generateRows(drugOptions)); - drugLinks.className ="choices"; + drugLinks.appendChild(App.UI.SlaveInteract.generateRows(drugOptions, slave)); + drugLinks.className = "choices"; el.append(drugLinks); - function generateRows(drugArray) { - let row = document.createDocumentFragment(); - for (let i = 0; i < drugArray.length; i++) { - let link; - const separator = document.createTextNode(` | `); - const keys = Object.keys(drugArray[i]); - - // Test to see if there was a problem with the key - for (let j = 0; j < keys.length; j++) { - if (["text", "drug", "disabled"].includes(keys[j])) { - continue; - } else { - drugArray[i].text += " ERROR, THIS SCENE WAS NOT ENTERED CORRECTLY"; - console.log("Trash found while generateRows() was running: " + keys[j] + ": " + drugArray[i][keys[j]]); - break; - } - } - // is it just text? - if (drugArray[i].disabled) { - link = App.UI.DOM.disabledLink(drugArray[i].text, [drugArray[i].disabled]); - // Are they already on this drug? - } else if (drugArray[i].drug === slave.drugs) { - link = App.UI.DOM.disabledLink(drugArray[i].text, [`${He} is already on this drug`]); - // Set up the link - } else { - link = App.UI.DOM.link( - drugArray[i].text, - () => { - slave.drugs = drugArray[i].drug, - App.UI.SlaveInteract.drugs(slave); - }, - ); - - // add a note node if required - if (drugArray[i].note) { - let note = document.createElement('span'); - note.textContent = `${drugArray[i].note} `; - note.className = "note"; - link.appendChild(note); - } - } - row.appendChild(link); - if (i < drugArray.length-1) { - row.appendChild(separator); - } - } - - return row; - } return jQuery('#drugs').empty().append(el); }; @@ -413,11 +371,17 @@ App.UI.SlaveInteract.useSlaveDisplay = function(slave) { // Goal: Be able to write the entire "use her" block with only dom fragments. let el = document.createElement('div'); - const - { - // eslint-disable-next-line no-unused-vars - he, him, his, hers, himself, boy, He, His - } = getPronouns(slave); + const { + // eslint-disable-next-line no-unused-vars + he, + him, + his, + hers, + himself, + boy, + He, + His + } = getPronouns(slave); /* Array of objects. Each object follows the form: { @@ -568,10 +532,10 @@ App.UI.SlaveInteract.useSlaveDisplay = function(slave) { fillAssOptions.push({text: `Aphrodisiacs`, scene: `FillUpButt`, updateSlave: {inflationType: "aphrodisiac", inflationMethod: 2}}); } if (slave.inflationType === "curative" || slave.inflationType === "none") { - fillAssOptions.push({text: `Curatives`, scene: `FillUpButt`, updateSlave: {inflationType: "curative", inflationMethod: 2}}); + fillAssOptions.push({text: `Curatives`, scene: `FillUpButt`, updateSlave: {inflationType: "curative", inflationMethod: 2}}); } if (slave.inflationType === "tightener" || slave.inflationType === "none") { - fillAssOptions.push({text: `Rectal tighteners`, scene: `FillUpButt`, updateSlave: {inflationType: "tightener", inflationMethod: 2}}); + fillAssOptions.push({text: `Rectal tighteners`, scene: `FillUpButt`, updateSlave: {inflationType: "tightener", inflationMethod: 2}}); } } } /* inflation < 3 */ @@ -601,7 +565,7 @@ App.UI.SlaveInteract.useSlaveDisplay = function(slave) { } if (canPenetrate(slave)) { sexOptions.push({text: `Have another slave ride ${his} cock`, scene: `FSlaveSlaveDick`}); - }else if (slave.clit >= 4) { + } else if (slave.clit >= 4) { sexOptions.push({text: `Have another slave ride ${his} clit-dick`, scene: `FSlaveSlaveDick`}); } if (V.seeBestiality === 1 && V.cheatMode === 1) { @@ -674,9 +638,10 @@ App.UI.SlaveInteract.useSlaveDisplay = function(slave) { } else { if (slave.relation !== 0) { let assayedSlave = getSlave(slave.relationTarget); - const - { - daughter: daughter2, mother: mother2, sister: sister2 + const { + daughter: daughter2, + mother: mother2, + sister: sister2 } = getPronouns(assayedSlave); if (isSlaveAvailable(assayedSlave)) { if (slave.relation === "mother") { @@ -744,7 +709,8 @@ App.UI.SlaveInteract.useSlaveDisplay = function(slave) { if (V.cheatMode === 1) { sexOptions.push({text: `Check ${his} stats`, scene: `Slave Stats`}); } - } else { /* IS A FUCKDOLL */ + } else { + /* IS A FUCKDOLL */ sexOptions.push({text: `Fuck ${his} face hole`, scene: `FFuckdollOral`}); if (canDoVaginal(slave)) { sexOptions.push({text: `Fuck ${his} front hole`, scene: `FFuckdollVaginal`}); @@ -761,7 +727,10 @@ App.UI.SlaveInteract.useSlaveDisplay = function(slave) { let activeSlaveRepSacrifice = repGainSacrifice(slave, V.arcologies[0]); if (activeSlaveRepSacrifice > 0 && V.arcologies[0].FSPaternalist === "unset" && (slave.breedingMark === 0 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) { sexOptions.push({ - text: `Sacrifice ${him} on the altar`, goto: `Aztec Slave Sacrifice`, note: `This will kill ${him} and gain you ${activeSlaveRepSacrifice} reputation`, update: {sacrificeType: "life"} + text: `Sacrifice ${him} on the altar`, + goto: `Aztec Slave Sacrifice`, + note: `This will kill ${him} and gain you ${activeSlaveRepSacrifice} reputation`, + update: {sacrificeType: "life"} }); } el.append(`Or use ${him} here: `); @@ -851,11 +820,17 @@ App.UI.SlaveInteract.useSlaveDisplay = function(slave) { }; App.UI.SlaveInteract.bloating = function(slave) { - const - { - // eslint-disable-next-line no-unused-vars - he, him, his, hers, himself, boy, He, His - } = getPronouns(slave); + const { + // eslint-disable-next-line no-unused-vars + he, + him, + his, + hers, + himself, + boy, + He, + His + } = getPronouns(slave); let bloating = document.createElement('div'); if (slave.inflation > 0) { let intro = document.createElement('span'); @@ -883,12 +858,12 @@ App.UI.SlaveInteract.bloating = function(slave) { `Let ${him} deflate`, () => { slave.inflation = 0, - slave.inflationType = "none", - slave.inflationMethod = 0, - slave.cumSource = 0, - slave.milkSource = 0, - SetBellySize(slave), - App.UI.SlaveInteract.refreshAll(slave); + slave.inflationType = "none", + slave.inflationMethod = 0, + slave.cumSource = 0, + slave.milkSource = 0, + SetBellySize(slave), + App.UI.SlaveInteract.refreshAll(slave); }, ); bloating.append(link); @@ -897,10 +872,10 @@ App.UI.SlaveInteract.bloating = function(slave) { `Let ${him} deflate`, () => { slave.inflation = 0, - slave.inflationType = "none", - slave.inflationMethod = 0, - SetBellySize(slave), - App.UI.SlaveInteract.refreshAll(slave); + slave.inflationType = "none", + slave.inflationMethod = 0, + SetBellySize(slave), + App.UI.SlaveInteract.refreshAll(slave); }, ); bloating.append(link); @@ -911,12 +886,18 @@ App.UI.SlaveInteract.bloating = function(slave) { }; App.UI.SlaveInteract.fertility = function(slave) { - const - { - // eslint-disable-next-line no-unused-vars - he, him, his, hers, himself, boy, He, His - } = getPronouns(slave); - const separator = document.createTextNode(` | `); + const { + // eslint-disable-next-line no-unused-vars + he, + him, + his, + hers, + himself, + boy, + He, + His + } = getPronouns(slave); + const separator = document.createTextNode(` | `); let fertilityblock = document.createElement('span'); if (slave.ovaries === 1 || slave.mpreg === 1 || slave.preg > 0) { let note = document.createTextNode(``); @@ -935,7 +916,7 @@ App.UI.SlaveInteract.fertility = function(slave) { note.textContent += `${His} pregnancy implant is turned off`; if (slave.broodmotherCountDown > 0) { note.textContent += `${he} is expected to be completely emptied of ${his} remaining brood in ${slave.broodmotherCountDown} week`; - if (slave.broodmotherCountDown > 1){ + if (slave.broodmotherCountDown > 1) { note.textContent += `s`; } note.textContent += `.`; @@ -943,7 +924,7 @@ App.UI.SlaveInteract.fertility = function(slave) { `Turn on implant`, () => { slave.broodmotherOnHold = 0, - slave.broodmotherCountDown = 0; + slave.broodmotherCountDown = 0; }, [], "Slave Interact" @@ -955,17 +936,17 @@ App.UI.SlaveInteract.fertility = function(slave) { let fertility = document.createElement('span'); fertility.id = "fertility"; fertility.style.fontWeight = "bold"; - if (slave.preg === -1) { - fertility.textContent = "using contraceptives"; - } else if (slave.pregWeek < 0) { - fertility.textContent = "postpartum"; - } else if (slave.preg === 0) { - fertility.textContent = "fertile"; - } else if (slave.preg < 4) { - fertility.textContent = "may be pregnant"; - } else { - fertility.textContent = `${slave.preg} weeks pregnant`; - } + if (slave.preg === -1) { + fertility.textContent = "using contraceptives"; + } else if (slave.pregWeek < 0) { + fertility.textContent = "postpartum"; + } else if (slave.preg === 0) { + fertility.textContent = "fertile"; + } else if (slave.preg < 4) { + fertility.textContent = "may be pregnant"; + } else { + fertility.textContent = `${slave.preg} weeks pregnant`; + } fertility.textContent += ". "; if (slave.preg > 0 && V.pregnancyMonitoringUpgrade === 1) { fertilityblock.append(App.UI.DOM.passageLink("Inspect pregnancy", "Analyze Pregnancy")); @@ -976,7 +957,7 @@ App.UI.SlaveInteract.fertility = function(slave) { `Use contraceptives`, () => { slave.preg = -1, - App.UI.SlaveInteract.refreshAll(slave); + App.UI.SlaveInteract.refreshAll(slave); }, ); fertilityblock.append(link); @@ -985,19 +966,19 @@ App.UI.SlaveInteract.fertility = function(slave) { `Let ${him} get pregnant`, () => { slave.preg = 0, - App.UI.SlaveInteract.refreshAll(slave); + App.UI.SlaveInteract.refreshAll(slave); }, ); fertilityblock.append(link); } else if (slave.induce === 1) { note.textContent += `Hormones are being slipped into ${his} food; ${he} will give birth suddenly and rapidly this week`; - } else if (slave.preg > slave.pregData.normalBirth-2 && slave.preg > slave.pregData.minLiveBirth && slave.broodmother === 0 && slave.labor === 0) { + } else if (slave.preg > slave.pregData.normalBirth - 2 && slave.preg > slave.pregData.minLiveBirth && slave.broodmother === 0 && slave.labor === 0) { let link = App.UI.DOM.link( `Induce labor`, () => { slave.labor = 1, - slave.induce = 1, - V.birthee = 1; + slave.induce = 1, + V.birthee = 1; }, [], "Slave Interact" @@ -1011,7 +992,7 @@ App.UI.SlaveInteract.fertility = function(slave) { `Turn off implant`, () => { slave.broodmotherOnHold = 1, - slave.broodmotherCountDown = 38-WombMinPreg(slave); + slave.broodmotherCountDown = 38 - WombMinPreg(slave); }, ); fertilityblock.append(link); @@ -1028,7 +1009,7 @@ App.UI.SlaveInteract.fertility = function(slave) { `Give ${him} a cesarean section`, () => { slave.broodmotherOnHold = 0, - slave.broodmotherCountDown = 0; + slave.broodmotherCountDown = 0; }, [], "csec" @@ -1041,14 +1022,14 @@ App.UI.SlaveInteract.fertility = function(slave) { `Abort ${his} pregnancy`, () => { slave.broodmotherOnHold = 0, - slave.broodmotherCountDown = 0; + slave.broodmotherCountDown = 0; }, [], "Abort" ); fertilityblock.append(link); } - fertilityblock.append(note); + fertilityblock.append(note); } } if ( @@ -1089,7 +1070,7 @@ App.UI.SlaveInteract.fertility = function(slave) { `Normal Birth`, () => { slave.pregControl = "none", - App.UI.SlaveInteract.fertility(slave); + App.UI.SlaveInteract.fertility(slave); }, ); control.append(link); @@ -1098,7 +1079,7 @@ App.UI.SlaveInteract.fertility = function(slave) { `Suppress Labor`, () => { slave.pregControl = "labor suppressors", - App.UI.SlaveInteract.fertility(slave); + App.UI.SlaveInteract.fertility(slave); }, ); control.append(link); @@ -1109,7 +1090,7 @@ App.UI.SlaveInteract.fertility = function(slave) { `Normal Gestation`, () => { slave.pregControl = "none", - App.UI.SlaveInteract.fertility(slave); + App.UI.SlaveInteract.fertility(slave); }, ); control.append(link); @@ -1120,7 +1101,7 @@ App.UI.SlaveInteract.fertility = function(slave) { `Slow Gestation`, () => { slave.pregControl = "slow gestation", - App.UI.SlaveInteract.fertility(slave); + App.UI.SlaveInteract.fertility(slave); }, ); control.append(link); @@ -1131,7 +1112,7 @@ App.UI.SlaveInteract.fertility = function(slave) { `Fast Gestation`, () => { slave.pregControl = "speed up", - App.UI.SlaveInteract.fertility(slave); + App.UI.SlaveInteract.fertility(slave); }, ); control.append(link); @@ -1143,1003 +1124,1279 @@ App.UI.SlaveInteract.fertility = function(slave) { }; App.UI.SlaveInteract.curatives = function(slave) { - let el = document.createElement('div'); - - const - { - // eslint-disable-next-line no-unused-vars - he, him, his, hers, himself, boy, He, His - } = getPronouns(slave); + const { + // eslint-disable-next-line no-unused-vars + he, + him, + his, + hers, + himself, + boy, + He, + His + } = getPronouns(slave); const curativeOptions = []; - drugOptions.push({text: `None`, drug: 0}); - drugOptions.push({text: `Preventatives`, drug: 1}); - drugOptions.push({text: `Curatives`, drug: 2}); - + curativeOptions.push({text: `None`, updateSlave:{curatives: 0}}); + curativeOptions.push({text: `Preventatives`, updateSlave:{curatives: 1}}); + curativeOptions.push({text: `Curatives`, updateSlave:{curatives: 2}}); + + let el = document.createElement('div'); let title = document.createElement('div'); title.append(`Health: `); - let chosenOption = document.createElement('span') + let chosenOption = document.createElement('span'); chosenOption.style.fontWeight = "bold"; if (slave.curatives > 1) { chosenOption.textContent = `curatives`; } else if (slave.curatives > 0) { chosenOption.textContent = `preventatives`; } else { - chosenOption.textContent = `none` + chosenOption.textContent = `none`; } + title.appendChild(chosenOption); title.append(`.`); - App.UI.SlaveInteract.generateRows(drugOptions); + let link = document.createElement('div'); + link.className = "choices"; + link.appendChild(App.UI.SlaveInteract.generateRows(curativeOptions, slave)); + el.append(title); + el.append(link); + return jQuery('#curatives').empty().append(el); +}; + +App.UI.SlaveInteract.aphrodisiacs = function(slave) { + const { + // eslint-disable-next-line no-unused-vars + he, + him, + his, + hers, + himself, + boy, + He, + His + } = getPronouns(slave); + const aphrodisiacOptions = []; + + aphrodisiacOptions.push({text: `None`, updateSlave:{aphrodisiacs: 0}}); + aphrodisiacOptions.push({text: `Aphrodisiacs`, updateSlave:{aphrodisiacs: 1}}); + aphrodisiacOptions.push({text: `Extreme aphrodisiacs`, updateSlave:{aphrodisiacs: 2}}); + aphrodisiacOptions.push({text: `Anaphrodisiacs`, updateSlave:{aphrodisiacs: -1}, note: `Supresses libido`}); - Aphrodisiacs: <span id="aphrodisiacs"><strong> + let el = document.createElement('div'); + let title = document.createElement('div'); + title.append(`Aphrodisiacs: `); + let chosenOption = document.createElement('span'); + chosenOption.style.fontWeight = "bold"; if (slave.aphrodisiacs > 1) { - extreme + chosenOption.textContent = `extreme`; } else if (slave.aphrodisiacs > 0) { - applied + chosenOption.textContent = `applied`; } else if (slave.aphrodisiacs === -1) { - anaphrodisiacs + chosenOption.textContent = `anaphrodisiacs`; } else { - none - }</strong></span>. - <<link "None">> - slave.aphrodisiacs = 0; - <<replace "#aphrodisiacs">><strong>none</strong> - <</replace>> - <</link>> - | <<link "Apply">> - slave.aphrodisiacs = 1; - <<replace "#aphrodisiacs">><strong>applied</strong> - <</replace>> - <</link>> - | <<link "Extreme">> - slave.aphrodisiacs = 2; - <<replace "#aphrodisiacs">><strong>extreme</strong> - <</replace>> - <</link>> - | <<link "Anaphrodisiacs">> - slave.aphrodisiacs = -1; - <<replace "#aphrodisiacs">><strong>anaphrodisiacs</strong> - <</replace>> - <</link>> - <br> - <span id="fertilityblock"></span> - <script>App.UI.SlaveInteract.fertility(V.activeSlave)</script> + chosenOption.textContent = `none`; + } + title.appendChild(chosenOption); + title.append(`.`); + let link = document.createElement('div'); + link.className = "choices"; + link.appendChild(App.UI.SlaveInteract.generateRows(aphrodisiacOptions, slave)); + el.append(title); + el.append(link); + return jQuery('#aphrodisiacs').empty().append(el); +}; + +App.UI.SlaveInteract.incubator = function(slave) { + const { + // eslint-disable-next-line no-unused-vars + he, + him, + his, + hers, + himself, + boy, + He, + His + } = getPronouns(slave); V.reservedChildren = FetusGlobalReserveCount("incubator"); - V.reservedChildrenNursery = FetusGlobalReserveCount("nursery"); let _reservedIncubator = WombReserveCount(slave, "incubator"); let _reservedNursery = WombReserveCount(slave, "nursery"); let _WL = slave.womb.length; + let el = document.createElement('div'); if (V.incubator > 0) { if (slave.preg > 0 && slave.broodmother === 0 && slave.pregKnown === 1 && slave.eggType === "human") { - if ((slave.assignment === "work in the dairy" && V.dairyPregSetting > 0) || (slave.assignment === "work in the farmyard" && V.farmyardBreeding > 0)) { - } else { - <br> + if ((slave.assignment === "work in the dairy" && V.dairyPregSetting > 0) || (slave.assignment === "work in the farmyard" && V.farmyardBreeding > 0)) {} else { + let title = document.createElement('div'); + let link = document.createElement('div'); + link.className = "choices"; if (_WL - _reservedNursery === 0) { - //V.His children are already reserved for V.nurseryName// + title.textContent = `${His} children are already reserved for V.nurseryName`; + title.style.fontStyle = "italic"; } else { - V.freeTanks = (V.incubator-V.tanks.length); + V.freeTanks = (V.incubator - V.tanks.length); if (_reservedIncubator > 0) { if (_WL === 1) { - r += `V.His child will be placed in V.incubatorName. `; + title.textContent = `${His} child will be placed in V.incubatorName. `; } else if (_reservedIncubator < _WL) { - _reservedIncubator of V.his children will be placed in V.incubatorName. + title.textContent = `${_reservedIncubator} of ${his} children will be placed in V.incubatorName.`; } else if (_WL === 2) { - r += `Both of V.his children will be placed in V.incubatorName. `; + title.textContent = `Both of ${his} children will be placed in V.incubatorName. `; } else { - r += `All ${_reservedIncubator} of V.his children will be placed in V.incubatorName. `; + title.textContent = `All ${_reservedIncubator} of ${his} children will be placed in V.incubatorName. `; } if ((_reservedIncubator + _reservedNursery < _WL) && (V.reservedChildren < V.freeTanks)) { - <<link "Keep another child" "Slave Interact">> - WombAddToGenericReserve(slave, "incubator", 1); - V.slaves[V.slaveIndices[slave.ID]] = slave; - V.reservedChildren = FetusGlobalReserveCount("incubator"); - <</link>> + link.appendChild( + App.UI.DOM.link( + `Keep another child`, + () => { + WombAddToGenericReserve(slave, "incubator", 1); + V.slaves[V.slaveIndices[slave.ID]] = slave; + V.reservedChildren = FetusGlobalReserveCount("incubator"); + }, + "Slave Interact" // TODO: may no longer need to do this anymore if refreshing in DOM + ) + ); if (_reservedIncubator > 0) { - | <<link "Keep one less child" "Slave Interact">> - WombCleanGenericReserve(slave, "incubator", 1); - V.slaves[V.slaveIndices[slave.ID]] = slave; - V.reservedChildren = FetusGlobalReserveCount("incubator"); - <</link>> + link.append(` | `); + link.appendChild( + App.UI.DOM.link( + `Keep one less child`, + () => { + WombCleanGenericReserve(slave, "incubator", 1); + V.slaves[V.slaveIndices[slave.ID]] = slave; + V.reservedChildren = FetusGlobalReserveCount("incubator"); + }, + "Slave Interact" // TODO: may no longer need to do this anymore if refreshing in DOM + ) + ); } if (_reservedIncubator > 1) { - | <<link "Keep none of V.his children" "Slave Interact">> - WombCleanGenericReserve(slave, "incubator", 9999); - V.slaves[V.slaveIndices[slave.ID]] = slave; - V.reservedChildren = FetusGlobalReserveCount("incubator"); - <</link>> + link.append(` | `); + link.appendChild( + App.UI.DOM.link( + `Keep none of ${his} children`, + () => { + WombCleanGenericReserve(slave, "incubator", 9999); + V.slaves[V.slaveIndices[slave.ID]] = slave; + V.reservedChildren = FetusGlobalReserveCount("incubator"); + }, + "Slave Interact" // TODO: may no longer need to do this anymore if refreshing in DOM + ) + ); } if ((V.reservedChildren + _WL - _reservedIncubator) <= V.freeTanks) { - | <<link "Keep the rest of V.his children" "Slave Interact">> - WombAddToGenericReserve(slave, "incubator", 9999); - V.slaves[V.slaveIndices[slave.ID]] = slave; - V.reservedChildren = FetusGlobalReserveCount("incubator"); - <</link>> + link.append(` | `); + link.appendChild( + App.UI.DOM.link( + `Keep the rest of ${his} children`, + () => { + WombAddToGenericReserve(slave, "incubator", 9999); + V.slaves[V.slaveIndices[slave.ID]] = slave; + V.reservedChildren = FetusGlobalReserveCount("incubator"); + }, + "Slave Interact" // TODO: may no longer need to do this anymore if refreshing in DOM + ) + ); } } else if ((_reservedIncubator === _WL) || (V.reservedChildren === V.freeTanks) || (_reservedIncubator - _reservedNursery >= 0)) { - <<link "Keep one less child" "Slave Interact">> - WombCleanGenericReserve(slave, "incubator", 1); - V.slaves[V.slaveIndices[slave.ID]] = slave; - V.reservedChildren = FetusGlobalReserveCount("incubator"); - <</link>> + link.appendChild( + App.UI.DOM.link( + `Keep one less child`, + () => { + WombCleanGenericReserve(slave, "incubator", 1); + V.slaves[V.slaveIndices[slave.ID]] = slave; + V.reservedChildren = FetusGlobalReserveCount("incubator"); + }, + "Slave Interact" // TODO: may no longer need to do this anymore if refreshing in DOM + ) + ); if (_reservedIncubator > 1) { - | <<link "Keep none of V.his children" "Slave Interact">> - WombCleanGenericReserve(slave, "incubator", 9999); - V.slaves[V.slaveIndices[slave.ID]] = slave; - V.reservedChildren = FetusGlobalReserveCount("incubator"); - <</link>> + link.append(` | `); + link.appendChild( + App.UI.DOM.link( + `Keep none of ${his} children`, + () => { + WombCleanGenericReserve(slave, "incubator", 9999); + V.slaves[V.slaveIndices[slave.ID]] = slave; + V.reservedChildren = FetusGlobalReserveCount("incubator"); + }, + "Slave Interact" // TODO: may no longer need to do this anymore if refreshing in DOM + ) + ); } } } else if (V.reservedChildren < V.freeTanks) { - V.He is pregnant and you have + title.textContent = `${He} is pregnant and you have `; if (V.freeTanks === 1) { - an + title.textContent += `an `; } - <span class="lime">available aging tank + let tank = document.createElement('span'); + tank.className = "lime"; + tank.textContent = `available aging tank`; if (V.freeTanks > 1) { - s + tank.textContent += `s`; } - .</span> + tank.textContent += `.`; let _cCount = (_WL > 1 ? "a" : "the"); - <<link "Keep _cCount child" "Slave Interact">> - WombAddToGenericReserve(slave, "incubator", 1); - V.slaves[V.slaveIndices[slave.ID]] = slave; - V.reservedChildren = FetusGlobalReserveCount("incubator"); - <</link>> + link.appendChild( + App.UI.DOM.link( + `Keep ${_cCount} child`, + () => { + WombAddToGenericReserve(slave, "incubator", 1); + V.slaves[V.slaveIndices[slave.ID]] = slave; + V.reservedChildren = FetusGlobalReserveCount("incubator"); + }, + "Slave Interact" // TODO: may no longer need to do this anymore if refreshing in DOM + ) + ); if ((_WL > 1) && (V.reservedChildren + _WL) <= V.freeTanks) { - | <<link "Keep all of V.his children" "Slave Interact">> - WombAddToGenericReserve(slave, "incubator", 9999); - V.slaves[V.slaveIndices[slave.ID]] = slave; - V.reservedChildren = FetusGlobalReserveCount("incubator"); - <</link>> + link.append(` | `); + link.appendChild( + App.UI.DOM.link( + `Keep all of ${his} children`, + () => { + WombAddToGenericReserve(slave, "incubator", 9999); + V.slaves[V.slaveIndices[slave.ID]] = slave; + V.reservedChildren = FetusGlobalReserveCount("incubator"); + }, + "Slave Interact" // TODO: may no longer need to do this anymore if refreshing in DOM + ) + ); } } else if (V.reservedChildren === V.freeTanks) { - r += `You have no available tanks for V.his children. `; + title.textContent = `You have no available tanks for ${his} children. `; } } + el.append(title); + el.append(link); } } } + return jQuery('#incubator').empty().append(el); +}; +App.UI.SlaveInteract.nursery = function(slave) { + const { + // eslint-disable-next-line no-unused-vars + he, + him, + his, + hers, + himself, + boy, + He, + His + } = getPronouns(slave); + let el = document.createElement('div'); if (V.nursery > 0) { + V.reservedChildrenNursery = FetusGlobalReserveCount("nursery"); + let _reservedIncubator = WombReserveCount(slave, "incubator"); + let _reservedNursery = WombReserveCount(slave, "nursery"); + let _WL = slave.womb.length; if (slave.preg > 0 && slave.broodmother === 0 && slave.pregKnown === 1 && slave.eggType === "human") { - if ((slave.assignment === "work in the dairy" && V.dairyPregSetting > 0) || (slave.assignment === "work in the farmyard" && V.farmyardBreeding > 0)) { - } else { - <br> + if ((slave.assignment === "work in the dairy" && V.dairyPregSetting > 0) || (slave.assignment === "work in the farmyard" && V.farmyardBreeding > 0)) {} else { + let title = document.createElement('div'); + let link = document.createElement('div'); + link.className = "choices"; if (_WL - _reservedIncubator === 0) { V.reservedChildren = 0; - //V.His children are already reserved for V.incubatorName// + title.textContent = `${His} children are already reserved for ${V.incubatorName}`; + title.style.fontStyle = "italic"; } else { - V.freeCribs = (V.nursery-V.cribs.length); + V.freeCribs = (V.nursery - V.cribs.length); if (_reservedNursery > 0) { if (_WL === 1) { - r += `V.His child will be placed in V.nurseryName. `; + title.textContent = `${His} child will be placed in V.nurseryName. `; } else if (_reservedNursery < _WL) { - _reservedNursery of V.his children will be placed in V.nurseryName. + title.textContent = `_reservedNursery of ${his} children will be placed in V.nurseryName.`; } else if (_WL === 2) { - r += `Both of V.his children will be placed in V.nurseryName. `; + title.textContent = `Both of ${his} children will be placed in V.nurseryName. `; } else { - r += `All ${_reservedNursery} of V.his children will be placed in V.nurseryName. `; + title.textContent = `All ${_reservedNursery} of ${his} children will be placed in V.nurseryName. `; } - if (((_reservedIncubator + _reservedNursery < _WL) && (V.reservedChildrenNursery < V.freeCribs))) { - <<link "Keep another child" "Slave Interact">> - WombAddToGenericReserve(slave, "nursery", 1); - V.slaves[V.slaveIndices[slave.ID]] = slave; - V.reservedChildren = FetusGlobalReserveCount("nursery"); - <</link>> + if ((_reservedIncubator + _reservedNursery < _WL) && (V.reservedChildrenNursery < V.freeCribs)) { + link.appendChild( + App.UI.DOM.link( + `Keep another child`, + () => { + WombAddToGenericReserve(slave, "nursery", 1); + V.slaves[V.slaveIndices[slave.ID]] = slave; + V.reservedChildren = FetusGlobalReserveCount("nursery"); + }, + "Slave Interact" // TODO: may no longer need to do this anymore if refreshing in DOM + ) + ); + if (_reservedNursery > 0) { - | <<link "Keep one less child" "Slave Interact">> - WombCleanGenericReserve(slave, "nursery", 1); - V.slaves[V.slaveIndices[slave.ID]] = slave; - V.reservedChildren = FetusGlobalReserveCount("nursery"); - <</link>> + link.append(` | `); + link.appendChild( + App.UI.DOM.link( + `Keep one less child`, + () => { + WombCleanGenericReserve(slave, "nursery", 1); + V.slaves[V.slaveIndices[slave.ID]] = slave; + V.reservedChildren = FetusGlobalReserveCount("nursery"); + }, + "Slave Interact" // TODO: may no longer need to do this anymore if refreshing in DOM + ) + ); } if (_reservedNursery > 1) { - | <<link "Keep none of V.his children" "Slave Interact">> - WombCleanGenericReserve(slave, "nursery", 9999); - <</link>> + link.append(` | `); + link.appendChild( + App.UI.DOM.link( + `Keep none of ${his} children`, + () => { + WombCleanGenericReserve(slave, "nursery", 9999); + // TODO: Copying this from the SC, but it's not three lines like the others? -LCD + }, + "Slave Interact" // TODO: may no longer need to do this anymore if refreshing in DOM + ) + ); } if ((V.reservedChildrenNursery + _WL - _reservedNursery) <= V.freeCribs) { - | <<link "Keep the rest of V.his children" "Slave Interact">> - WombAddToGenericReserve(slave, "nursery", 9999); - <</link>> + link.append(` | `); + link.appendChild( + App.UI.DOM.link( + `Keep the rest of ${his} children`, + () => { + WombAddToGenericReserve(slave, "nursery", 9999); + // TODO: Copying this from the SC, but it's not three lines like the others? -LCD + }, + "Slave Interact" // TODO: may no longer need to do this anymore if refreshing in DOM + ) + ); } } else if ((_reservedNursery === _WL) || (V.reservedChildrenNursery === V.freeCribs) || (_reservedNursery - _reservedIncubator >= 0)) { - <<link "Keep one less child" "Slave Interact">> - WombCleanGenericReserve(slave, "nursery", 1); - V.slaves[V.slaveIndices[slave.ID]] = slave; - V.reservedChildren = FetusGlobalReserveCount("nursery"); - <</link>> + link.appendChild( + App.UI.DOM.link( + `Keep one less child`, + () => { + WombCleanGenericReserve(slave, "nursery", 1); + V.slaves[V.slaveIndices[slave.ID]] = slave; + V.reservedChildren = FetusGlobalReserveCount("nursery"); + }, + "Slave Interact" // TODO: may no longer need to do this anymore if refreshing in DOM + ) + ); + if (_reservedNursery > 1) { - | <<link "Keep none of V.his children" "Slave Interact">> - WombCleanGenericReserve(slave, "nursery", 9999); - V.slaves[V.slaveIndices[slave.ID]] = slave; - V.reservedChildren = FetusGlobalReserveCount("nursery"); - <</link>> + link.append(` | `); + link.appendChild( + App.UI.DOM.link( + `Keep none of ${his} children`, + () => { + WombCleanGenericReserve(slave, "nursery", 9999); + V.slaves[V.slaveIndices[slave.ID]] = slave; + V.reservedChildren = FetusGlobalReserveCount("nursery"); + }, + "Slave Interact" // TODO: may no longer need to do this anymore if refreshing in DOM + ) + ); } } } else if (V.reservedChildrenNursery < V.freeCribs) { - V.He is pregnant and you have + title.textContent = `${He} is pregnant and you have `; if (V.freeCribs === 1) { - an + title.textContent += `an `; } - <span class="lime">available room + let crib = document.createElement('span'); + crib.className = "lime"; + crib.textContent = `available room`; if (V.freeCribs > 1) { - s + crib.textContent += `s`; } - </span> in V.nurseryName. + crib.textContent += `.`; let _cCount = (_WL > 1 ? "a" : "the"); - <<link "Keep _cCount child" "Slave Interact">> - WombAddToGenericReserve(slave, "nursery", 1); - V.slaves[V.slaveIndices[slave.ID]] = slave; - V.reservedChildren = FetusGlobalReserveCount("nursery"); - <</link>> + link.appendChild( + App.UI.DOM.link( + `Keep ${_cCount} child`, + () => { + WombAddToGenericReserve(slave, "nursery", 1); + V.slaves[V.slaveIndices[slave.ID]] = slave; + V.reservedChildren = FetusGlobalReserveCount("nursery"); + }, + "Slave Interact" // TODO: may no longer need to do this anymore if refreshing in DOM + ) + ); if ((_WL > 1) && (V.reservedChildrenNursery + _WL) <= V.freeCribs) { - | <<link "Keep all of V.his children" "Slave Interact">> - WombAddToGenericReserve(slave, "nursery", 9999); - V.slaves[V.slaveIndices[slave.ID]] = slave; - V.reservedChildren = FetusGlobalReserveCount("nursery"); - <</link>> + link.append(` | `); + link.appendChild( + App.UI.DOM.link( + `Keep all of ${his} children`, + () => { + WombAddToGenericReserve(slave, "nursery", 9999); + V.slaves[V.slaveIndices[slave.ID]] = slave; + V.reservedChildren = FetusGlobalReserveCount("nursery"); + }, + "Slave Interact" // TODO: may no longer need to do this anymore if refreshing in DOM + ) + ); } } else if (V.reservedChildrenNursery === V.freeCribs) { - r += `You have no available rooms for V.his children. `; + title.textContent = `You have no available rooms for ${his} children. `; } } + el.append(title); + el.append(link); } } } + return jQuery('#nursery').empty().append(el); +}; - if (V.propOutcome === 1 && V.arcologies[0].FSRestart !== "unset") { - if (slave.breedingMark === 0 && slave.fuckdoll === 0 && slave.eggType === "human" && isFertile(slave) && slave.preg === 0) { - <br> - [[Breeder Eligibility Exam|BreedingTest]] - } - } - - <span id="bloating"></span> - <script>App.UI.SlaveInteract.bloating(V.activeSlave)</script> - - Hormones: <strong><span id="hormones"> - if (slave.hormones === -2) { - intensive male - } else if (slave.hormones === -1) { - male - } else if (slave.hormones === 2) { - intensive female - } else if (slave.hormones === 1) { - female - } else { - none - }</span></strong>. - if (slave.indentureRestrictions < 2) { - <<link "Intensive Female">> - slave.hormones = 2; - <<replace "#hormones">> - intensive female - <</replace>> - <</link>> - | - } - <<link "Female">> - slave.hormones = 1; - <<replace "#hormones">> - female - <</replace>> - <</link>> - | - <<link "None">> - slave.hormones = 0; - <<replace "#hormones">> - none - <</replace>> - <</link>> - | - <<link "Male">> - slave.hormones = -1; - <<replace "#hormones">> - male - <</replace>> - <</link>> - | - if (slave.indentureRestrictions < 2) { - <<link "Intensive Male">> - slave.hormones = -2; - <<replace "#hormones">> - intensive male - <</replace>> - <</link>> - } - - <br>Diet: <strong><span id="diet">slave.diet</span></strong>. - <<link "Healthy">> - slave.diet = "healthy"; - <<replace "#diet">> - slave.diet - <</replace>> - <</link>> - if ((slave.health.condition < 90 || slave.chem >= 10) && (V.dietCleanse === 1)) { - | <<link "Cleanse">> - slave.diet = "cleansing"; - <<replace "#diet">> - slave.diet - <</replace>> - <</link>> - } else if ((V.dietCleanse === 1)) { - | //V.He is already healthy// - } - if ((slave.balls > 0) && (V.cumProDiet === 1)) { - | <<link "Cum production">> - slave.diet = "cum production"; - <<replace "#diet">> - slave.diet - <</replace>> - <</link>> - } - if (isFertile(slave) && slave.preg === 0 && (V.dietFertility === 1)) { - | <<link "Fertility">> - slave.diet = "fertility"; - <<replace "#diet">> - slave.diet - <</replace>> - <</link>> - } - if ((slave.weight >= -95)) { - | <<link "Lose weight">> - slave.diet = "restricted"; - <<replace "#diet">> - slave.diet - <</replace>> - <</link>> - } else { - | //V.He is already underweight// - } - if (slave.weight <= 200) { - | <<link "Fatten">> - slave.diet = "fattening"; - <<replace "#diet">> - slave.diet - <</replace>> - <</link>> - } else { - | //V.He is already extremely overweight// - } - if (V.feeder === 1) { - | <<link "Estrogen enriched">> - slave.diet = "XX"; - <<replace "#diet">> - slave.diet - <</replace>> - <</link>> - | <<link "Testosterone enriched">> - slave.diet = "XY"; - <<replace "#diet">> - slave.diet - <</replace>> - <</link>> - if (V.dietXXY === 1 && slave.balls > 0 && (slave.ovaries === 1 || slave.mpreg === 1)) { - | <<link "Herm hormone blend">> - slave.diet = "XXY"; - <<replace "#diet">> - slave.diet - <</replace>> - <</link>> - } - } - if ((slave.muscles <= 95) && !isAmputee(slave)) { - | <<link "Build muscle">> - slave.diet = "muscle building"; - <<replace "#diet">> - slave.diet - <</replace>> - <</link>> - } else if (!isAmputee(slave)) { - | //V.He is maintaining V.his enormous musculature// - } else { - | //V.He has no limbs and thus can't effectively build muscle// - } - if ((slave.muscles > 5 || slave.fuckdoll === 0) && canWalk(slave)) { - | <<link "Slim down">> - slave.diet = "slimming"; - <<replace "#diet">> - slave.diet - <</replace>> - <</link>> - } else if (!canWalk(slave)) { - | //V.He can't move and thus can't trim down// - } else if (slave.fuckdoll > 0) { - | //V.He has no muscles left to lose// - } - - <br>Diet Base: <strong><span id="dietBase"> - if (slave.dietCum === 2) { - cum based - } else if ((slave.dietCum === 1) && (slave.dietMilk === 0)) { - cum added - } else if ((slave.dietCum === 1) && (slave.dietMilk === 1)) { - cum and milk added - } else if ((slave.dietMilk === 1) && (slave.dietCum === 0)) { - milk added - } else if ((slave.dietMilk === 2)) { - milk based - } else if ((slave.dietCum === 0) && (slave.dietMilk === 0)) { - normal - } else { - THERE HAS BEEN AN ERROR - }</span></strong>. - <<link "Normal">> - slave.dietCum = 0; - slave.dietMilk = 0; - <<replace "#dietBase">> - normal - <</replace>> - <</link>> - | - <<link "Cum added">> - slave.dietCum = 1; - slave.dietMilk = 0; - <<replace "#dietBase">> - cum added - <</replace>> - <</link>> - | - <<link "Milk added">> - slave.dietCum = 0; - slave.dietMilk = 1; - <<replace "#dietBase">> - milk added - <</replace>> - <</link>> - | - <<link "Cum & milk added">> - slave.dietCum = 1; - slave.dietMilk = 1; - <<replace "#dietBase">> - cum & milk added - <</replace>> - <</link>> - | - <<link "Cum based">> - slave.dietCum = 2; - slave.dietMilk = 0; - <<replace "#dietBase">> - cum based - <</replace>> - <</link>> - | - <<link "Milk based">> - slave.dietCum = 0; - slave.dietMilk = 2; - <<replace "#dietBase">> - milk based - <</replace>> - <</link>> - - if (V.arcologies[0].FSHedonisticDecadenceResearch === 1) { - <br>Solid Slave Food Access: <strong><span id="snacks"> - if (slave.onDiet === 0) { - Free to stuff V.himself. - } else { - On a strict diet. - }</span></strong> - <<link "No access">> - slave.onDiet = 1; - <<replace "#snacks">> - On a strict diet. - <</replace>> - <</link>> - | - <<link "Full access">> - slave.onDiet = 0; - <<replace "#snacks">> - Free to stuff V.himself. - <</replace>> - <</link>> - } - - <br><br>__Behavior__:<br> - if (slave.fuckdoll > 0) { - //Rules have little meaning for living sex toys// - } else { - <<set _visibleSlaves = V.slaves.filter(s => assignmentVisible(s) && (s.assignment !== "be your Head Girl" || V.HGSuite !== 1) && (s.assignment !== "guard you" || V.dojo <= 1)), - V.dormitoryPopulation = _visibleSlaves.filter(s => s.rules.living !== "luxurious").length; - V.roomsPopulation = _visibleSlaves.length - V.dormitoryPopulation - _visibleSlaves.filter(s => s.rules.living === "luxurious" && s.relationship >= 4).length * 0.5; - - r += `Living standard: ''<span id="livingRules">slave.rules.living</span>.'' `; - if (setup.facilityCareers.includes(slave.assignment)) { - //V.His living conditions are managed by V.his assignment.// - } else if ((slave.assignment === "be your Head Girl") && (V.HGSuite === 1)) { - //V.He has V.his own little luxurious room in the penthouse with everything V.he needs to be a proper Head Girl.// - } else if ((slave.assignment === "guard you") && (V.dojo > 1)) { - //V.He has a comfortable room in the armory to call V.his own.// +{ + /* + if (V.propOutcome === 1 && V.arcologies[0].FSRestart !== "unset") { + if (slave.breedingMark === 0 && slave.fuckdoll === 0 && slave.eggType === "human" && isFertile(slave) && slave.preg === 0) { + < + br > & nbsp; & nbsp; & nbsp; & nbsp; + [ + [Breeder Eligibility Exam | BreedingTest] + ] + } + } + + < + span id = "bloating" > < /span> < + script > App.UI.SlaveInteract.bloating(V.activeSlave) < /script> + + Hormones: < strong > < span id = "hormones" > + if (slave.hormones === -2) { + intensive male + } else if (slave.hormones === -1) { + male + } else if (slave.hormones === 2) { + intensive female + } else if (slave.hormones === 1) { + female } else { - <<link "Spare">> - slave.rules.living = "spare"; - <<replace "#livingRules">> - slave.rules.living - <</replace>> - <</link>> - | - <<link "Normal">> - slave.rules.living = "normal"; - <<replace "#livingRules">> - slave.rules.living - <</replace>> - <</link>> - | - if (V.roomsPopulation <= V.rooms-0.5) { - <<link "Luxurious">> - slave.rules.living = "luxurious"; - <<replace "#livingRules">> - slave.rules.living - <</replace>> - <</link>> - } else {//No luxurious rooms available// - } + none + } < /span></strong > . + if(slave.indentureRestrictions < 2) { + << + link "Intensive Female" >> + slave.hormones = 2; << + replace "#hormones" >> + intensive female << + /replace>> << / + link >> | + } << + link "Female" >> + slave.hormones = 1; << + replace "#hormones" >> + female << + /replace>> << / + link >> | + << + link "None" >> + slave.hormones = 0; << + replace "#hormones" >> + none << + /replace>> << / + link >> | + << + link "Male" >> + slave.hormones = -1; << + replace "#hormones" >> + male << + /replace>> << / + link >> | + if (slave.indentureRestrictions < 2) { + << + link "Intensive Male" >> + slave.hormones = -2; << + replace "#hormones" >> + intensive male << + /replace>> << / + link >> + } + + < + br > Diet: < strong > < span id = "diet" > slave.diet < /span></strong > . << + link "Healthy" >> + slave.diet = "healthy"; << + replace "#diet" >> + slave.diet << + /replace>> << / + link >> + if ((slave.health.condition < 90 || slave.chem >= 10) && (V.dietCleanse === 1)) { + | + << + link "Cleanse" >> + slave.diet = "cleansing"; << + replace "#diet" >> + slave.diet << + /replace>> << / + link >> + } else if ((V.dietCleanse === 1)) { + | //${He} is already healthy// + } + if ((slave.balls > 0) && (V.cumProDiet === 1)) { + | + << + link "Cum production" >> + slave.diet = "cum production"; << + replace "#diet" >> + slave.diet << + /replace>> << / + link >> + } + if (isFertile(slave) && slave.preg === 0 && (V.dietFertility === 1)) { + | + << + link "Fertility" >> + slave.diet = "fertility"; << + replace "#diet" >> + slave.diet << + /replace>> << / + link >> + } + if ((slave.weight >= -95)) { + | + << + link "Lose weight" >> + slave.diet = "restricted"; << + replace "#diet" >> + slave.diet << + /replace>> << / + link >> + } else { + | //${He} is already underweight// + } + if (slave.weight <= 200) { + | + << + link "Fatten" >> + slave.diet = "fattening"; << + replace "#diet" >> + slave.diet << + /replace>> << / + link >> + } else { + | //${He} is already extremely overweight// + } + if (V.feeder === 1) { + | + << + link "Estrogen enriched" >> + slave.diet = "XX"; << + replace "#diet" >> + slave.diet << + /replace>> << / + link >> | + << + link "Testosterone enriched" >> + slave.diet = "XY"; << + replace "#diet" >> + slave.diet << + /replace>> << / + link >> + if (V.dietXXY === 1 && slave.balls > 0 && (slave.ovaries === 1 || slave.mpreg === 1)) { + | + << + link "Herm hormone blend" >> + slave.diet = "XXY"; << + replace "#diet" >> + slave.diet << + /replace>> << / + link >> + } } - - <br>Typical punishment: ''<span id="standardPunishment">slave.rules.punishment</span>.'' - <<link "Confinement">> - slave.rules.punishment = "confinement"; - <<replace "#standardPunishment">> - slave.rules.punishment - <</replace>> - <</link>> - | - <<link "Whipping">> - slave.rules.punishment = "whipping"; - <<replace "#standardPunishment">> - slave.rules.punishment - <</replace>> - <</link>> - | - <<link "Chastity">> - slave.rules.punishment = "chastity"; - <<replace "#standardPunishment">> - slave.rules.punishment - <</replace>> - <</link>> - | - <<link "Situational">> - slave.rules.punishment = "situational"; - <<replace "#standardPunishment">> - slave.rules.punishment - <</replace>> - <</link>> - - r += `Typical reward: ''<span id="standardReward">slave.rules.reward</span>.'' `; - <<link "Relaxation">> - slave.rules.reward = "relaxation"; - <<replace "#standardReward">> - slave.rules.reward - <</replace>> - <</link>> - | - <<link "Drugs">> - slave.rules.reward = "drugs"; - <<replace "#standardReward">> - slave.rules.reward - <</replace>> - <</link>> - | - <<link "Orgasm">> - slave.rules.reward = "orgasm"; - <<replace "#standardReward">> - slave.rules.reward - <</replace>> - <</link>> - | - <<link "Situational">> - slave.rules.reward = "situational"; - <<replace "#standardReward">> - slave.rules.reward - <</replace>> - <</link>> - - if (setup.facilityHeads.includes(slave.assignment)) { - if (slave.lactation !== 2) { - <br>Lactation maintenance for facility heads: ''<span id="lactationRules">slave.rules.lactation</span>.'' - <<link "Left alone">> - slave.rules.lactation = "none"; - <<replace "#lactationRules">> - slave.rules.lactation - <</replace>> - <</link>> - | - if (slave.lactation === 0) { - <<link "Induce lactation">> - slave.rules.lactation = "induce"; - <<replace "#lactationRules">> - slave.rules.lactation - <</replace>> - <</link>> + if ((slave.muscles <= 95) && !isAmputee(slave)) { + | + << + link "Build muscle" >> + slave.diet = "muscle building"; << + replace "#diet" >> + slave.diet << + /replace>> << / + link >> + } else if (!isAmputee(slave)) { + | //${He} is maintaining ${his} enormous musculature// + } else { + | //${He} has no limbs and thus can't effectively build muscle// + } + if ((slave.muscles > 5 || slave.fuckdoll === 0) && canWalk(slave)) { + | + << + link "Slim down" >> + slave.diet = "slimming"; << + replace "#diet" >> + slave.diet << + /replace>> << / + link >> + } else if (!canWalk(slave)) { + | //${He} can't move and thus can't trim down// + } else if (slave.fuckdoll > 0) { + | //${He} has no muscles left to lose// + } + + < + br > Diet Base: < strong > < span id = "dietBase" > + if (slave.dietCum === 2) { + cum based + } else if ((slave.dietCum === 1) && (slave.dietMilk === 0)) { + cum added + } else if ((slave.dietCum === 1) && (slave.dietMilk === 1)) { + cum and milk added + } else if ((slave.dietMilk === 1) && (slave.dietCum === 0)) { + milk added + } else if ((slave.dietMilk === 2)) { + milk based + } else if ((slave.dietCum === 0) && (slave.dietMilk === 0)) { + normal + } else { + THERE HAS BEEN AN ERROR + } < /span></strong > . << + link "Normal" >> + slave.dietCum = 0; + slave.dietMilk = 0; << + replace "#dietBase" >> + normal << + /replace>> << / + link >> | + << + link "Cum added" >> + slave.dietCum = 1; + slave.dietMilk = 0; << + replace "#dietBase" >> + cum added << + /replace>> << / + link >> | + << + link "Milk added" >> + slave.dietCum = 0; + slave.dietMilk = 1; << + replace "#dietBase" >> + milk added << + /replace>> << / + link >> | + << + link "Cum & milk added" >> + slave.dietCum = 1; + slave.dietMilk = 1; << + replace "#dietBase" >> + cum & milk added << + /replace>> << / + link >> | + << + link "Cum based" >> + slave.dietCum = 2; + slave.dietMilk = 0; << + replace "#dietBase" >> + cum based << + /replace>> << / + link >> | + << + link "Milk based" >> + slave.dietCum = 0; + slave.dietMilk = 2; << + replace "#dietBase" >> + milk based << + /replace>> << / + link >> + + if (V.arcologies[0].FSHedonisticDecadenceResearch === 1) { + < + br > Solid Slave Food Access: < strong > < span id = "snacks" > + if (slave.onDiet === 0) { + Free to stuff $ { himself }. + } else { + On a strict diet. + } < /span></strong > + << + link "No access" >> + slave.onDiet = 1; << + replace "#snacks" >> + On a strict diet. << + /replace>> << / + link >> | + << + link "Full access" >> + slave.onDiet = 0; << + replace "#snacks" >> + Free to stuff $ { himself }. << + /replace>> << / + link >> + } + + < + br > < br > __Behavior__: < br > + if (slave.fuckdoll > 0) { + //Rules have little meaning for living sex toys// + } else { + << + set _visibleSlaves = V.slaves.filter(s => assignmentVisible(s) && (s.assignment !== "be your Head Girl" || V.HGSuite !== 1) && (s.assignment !== "guard you" || V.dojo <= 1)), + V.dormitoryPopulation = _visibleSlaves.filter(s => s.rules.living !== "luxurious").length; + V.roomsPopulation = _visibleSlaves.length - V.dormitoryPopulation - _visibleSlaves.filter(s => s.rules.living === "luxurious" && s.relationship >= 4).length * 0.5; + + r += `Living standard: ''<span id="livingRules">slave.rules.living</span>.'' `; + if (setup.facilityCareers.includes(slave.assignment)) { + //${His} living conditions are managed by ${his} assignment.// + } else if ((slave.assignment === "be your Head Girl") && (V.HGSuite === 1)) { + //${He} has ${his} own little luxurious room in the penthouse with everything ${he} needs to be a proper Head Girl.// + } else if ((slave.assignment === "guard you") && (V.dojo > 1)) { + //${He} has a comfortable room in the armory to call ${his} own.// } else { - <<link "Maintain lactation">> - slave.rules.lactation = "maintain"; - <<replace "#lactationRules">> - slave.rules.lactation - <</replace>> - <</link>> + << + link "Spare" >> + slave.rules.living = "spare"; << + replace "#livingRules" >> + slave.rules.living << + /replace>> << / + link >> | + << + link "Normal" >> + slave.rules.living = "normal"; << + replace "#livingRules" >> + slave.rules.living << + /replace>> << / + link >> | + if (V.roomsPopulation <= V.rooms - 0.5) { + << + link "Luxurious" >> + slave.rules.living = "luxurious"; << + replace "#livingRules" >> + slave.rules.living << + /replace>> << / + link >> + } else { //No luxurious rooms available// + } } - } - } - <br><br>Non-assignment orgasm rules: - <div style="text-indent:2em"> - r += `Masturbation is ''<span id="relMasturbation"> `; - if (slave.rules.release.masturbation === 1) { - allowed - } else { - forbidden - } - </span> - .'' - <<link "Allow">> - slave.rules.release.masturbation = 1; - <<replace "#relMasturbation">> - allowed - <</replace>> - <</link>> - | - <<link "Forbid">> - slave.rules.release.masturbation = 0; - <<replace "#relMasturbation">> - forbidden - <</replace>> - <</link>> - </div> - <div style="text-indent:2em"> - r += `Sex with romantic partner is ''<span id="relPartner"> `; - if (slave.rules.release.partner === 1) { - allowed - } else { - forbidden - } - </span> - .'' - <<link "Allow">> - slave.rules.release.partner = 1; - <<replace "#relPartner">> - allowed - <</replace>> - <</link>> - | - <<link "Forbid">> - slave.rules.release.partner = 0; - <<replace "#relPartner">> - forbidden - <</replace>> - <</link>> - </div> - if (V.seeIncest === 1) { - <div style="text-indent:2em"> - r += `Sex with close family is ''<span id="relFamily"> `; - if (slave.rules.release.family === 1) { + < + br > Typical punishment: '' < span id = "standardPunishment" > slave.rules.punishment < /span>.'' << + link "Confinement" >> + slave.rules.punishment = "confinement"; << + replace "#standardPunishment" >> + slave.rules.punishment << + /replace>> << / + link >> | + << + link "Whipping" >> + slave.rules.punishment = "whipping"; << + replace "#standardPunishment" >> + slave.rules.punishment << + /replace>> << / + link >> | + << + link "Chastity" >> + slave.rules.punishment = "chastity"; << + replace "#standardPunishment" >> + slave.rules.punishment << + /replace>> << / + link >> | + << + link "Situational" >> + slave.rules.punishment = "situational"; << + replace "#standardPunishment" >> + slave.rules.punishment << + /replace>> << / + link >> & + nbsp; & nbsp; & nbsp; & nbsp; + r += `Typical reward: ''<span id="standardReward">slave.rules.reward</span>.'' `; << + link "Relaxation" >> + slave.rules.reward = "relaxation"; << + replace "#standardReward" >> + slave.rules.reward << + /replace>> << / + link >> | + << + link "Drugs" >> + slave.rules.reward = "drugs"; << + replace "#standardReward" >> + slave.rules.reward << + /replace>> << / + link >> | + << + link "Orgasm" >> + slave.rules.reward = "orgasm"; << + replace "#standardReward" >> + slave.rules.reward << + /replace>> << / + link >> | + << + link "Situational" >> + slave.rules.reward = "situational"; << + replace "#standardReward" >> + slave.rules.reward << + /replace>> << / + link >> + + if (setup.facilityHeads.includes(slave.assignment)) { + if (slave.lactation !== 2) { + < + br > Lactation maintenance + for facility heads: '' < span id = "lactationRules" > slave.rules.lactation < /span>.'' << + link "Left alone" >> + slave.rules.lactation = "none"; << + replace "#lactationRules" >> + slave.rules.lactation << + /replace>> << / + link >> | + if (slave.lactation === 0) { + << + link "Induce lactation" >> + slave.rules.lactation = "induce"; << + replace "#lactationRules" >> + slave.rules.lactation << + /replace>> << / + link >> + } else { + << + link "Maintain lactation" >> + slave.rules.lactation = "maintain"; << + replace "#lactationRules" >> + slave.rules.lactation << + /replace>> << / + link >> + } + } + } + + < + br > < br > Non - assignment orgasm rules: + < + div style = "text-indent:2em" > + r += `Masturbation is ''<span id="relMasturbation"> `; + if (slave.rules.release.masturbation === 1) { allowed } else { forbidden - } - </span> - .'' - <<link "Allow">> - slave.rules.release.family = 1; - <<replace "#relFamily">> - allowed - <</replace>> - <</link>> - | - <<link "Forbid">> - slave.rules.release.family = 0; - <<replace "#relFamily">> - forbidden - <</replace>> - <</link>> - </div> - } - <div style="text-indent:2em"> - r += `Sex with other slaves is ''<span id="relSlaves"> `; - if (slave.rules.release.slaves === 1) { - allowed - } else { - forbidden - } - </span> - .'' - <<link "Allow">> - slave.rules.release.slaves = 1; - <<replace "#relSlaves">> - allowed - <</replace>> - <</link>> - | - <<link "Forbid">> - slave.rules.release.slaves = 0; - <<replace "#relSlaves">> - forbidden - <</replace>> - <</link>> - </div> - <div style="text-indent:2em"> - r += `Routine sex with ${properMaster()} is ''<span id="relMaster"> `; - if (slave.rules.release.master === 1) { - granted - } else { - denied - } - </span> - .'' - <<link "Grant">> - slave.rules.release.master = 1; - <<replace "#relMaster">> - granted - <</replace>> - <</link>> - | - <<link "Deny">> - slave.rules.release.master = 0; - <<replace "#relMaster">> - denied - <</replace>> - <</link>> - </div> - } - - if (slave.clitPiercing === 3 || slave.vaginalAccessory === "smart bullet vibrator") { - <div> - if (slave.clitPiercing === 3) { - if (slave.dick < 1) { - V.His smart clit piercing - if (slave.vaginalAccessory === "smart bullet vibrator") { - and smart bullet vibrator are + } < + /span> + . + '' << + link "Allow" >> + slave.rules.release.masturbation = 1; << + replace "#relMasturbation" >> + allowed << + /replace>> << / + link >> | + << + link "Forbid" >> + slave.rules.release.masturbation = 0; << + replace "#relMasturbation" >> + forbidden << + /replace>> << / + link >> < + /div> < + div style = "text-indent:2em" > + r += `Sex with romantic partner is ''<span id="relPartner"> `; + if (slave.rules.release.partner === 1) { + allowed + } else { + forbidden + } < + /span> + . + '' << + link "Allow" >> + slave.rules.release.partner = 1; << + replace "#relPartner" >> + allowed << + /replace>> << / + link >> | + << + link "Forbid" >> + slave.rules.release.partner = 0; << + replace "#relPartner" >> + forbidden << + /replace>> << / + link >> < + /div> + if (V.seeIncest === 1) { + < + div style = "text-indent:2em" > + r += `Sex with close family is ''<span id="relFamily"> `; + if (slave.rules.release.family === 1) { + allowed } else { - is + forbidden + } < + /span> + . + '' << + link "Allow" >> + slave.rules.release.family = 1; << + replace "#relFamily" >> + allowed << + /replace>> << / + link >> | + << + link "Forbid" >> + slave.rules.release.family = 0; << + replace "#relFamily" >> + forbidden << + /replace>> << / + link >> < + /div> + } < + div style = "text-indent:2em" > + r += `Sex with other slaves is ''<span id="relSlaves"> `; + if (slave.rules.release.slaves === 1) { + allowed + } else { + forbidden + } < + /span> + . + '' << + link "Allow" >> + slave.rules.release.slaves = 1; << + replace "#relSlaves" >> + allowed << + /replace>> << / + link >> | + << + link "Forbid" >> + slave.rules.release.slaves = 0; << + replace "#relSlaves" >> + forbidden << + /replace>> << / + link >> < + /div> < + div style = "text-indent:2em" > + r += `Routine sex with ${properMaster()} is ''<span id="relMaster"> `; + if (slave.rules.release.master === 1) { + granted + } else { + denied + } < + /span> + . + '' << + link "Grant" >> + slave.rules.release.master = 1; << + replace "#relMaster" >> + granted << + /replace>> << / + link >> | + << + link "Deny" >> + slave.rules.release.master = 0; << + replace "#relMaster" >> + denied << + /replace>> << / + link >> < + /div> + } + + if (slave.clitPiercing === 3 || slave.vaginalAccessory === "smart bullet vibrator") { + < + div > + if (slave.clitPiercing === 3) { + if (slave.dick < 1) { + $ { His } smart clit piercing + if (slave.vaginalAccessory === "smart bullet vibrator") { + and smart bullet vibrator are + } else { + is } set to - } else { - r += `V.His smart frenulum piercing `; - if (slave.vaginalAccessory === "smart bullet vibrator") { - and smart bullet vibrator are - } else { - is - } - set to - } - } else { - r += `V.His smart bullet vibe is set to `; - } - <strong><span id="setting">slave.clitSetting</span></strong>. - <<link "Vanilla">> - slave.clitSetting = "vanilla"; - <<replace "#setting">> - slave.clitSetting - <</replace>> - <</link>> - | <<link "Oral">> - slave.clitSetting = "oral"; - <<replace "#setting">> - slave.clitSetting - <</replace>> - <</link>> - | <<link "Anal">> - slave.clitSetting = "anal"; - <<replace "#setting">> - slave.clitSetting - <</replace>> - <</link>> - | <<link "Boobs">> - slave.clitSetting = "boobs"; - <<replace "#setting">> - slave.clitSetting - <</replace>> - <</link>> - | <<link "Sub">> - slave.clitSetting = "submissive"; - <<replace "#setting">> - slave.clitSetting - <</replace>> - <</link>> - | <<link "Dom">> - slave.clitSetting = "dom"; - <<replace "#setting">> - slave.clitSetting - <</replace>> - <</link>> - | <<link "Humiliation">> - slave.clitSetting = "humiliation"; - <<replace "#setting">> - slave.clitSetting - <</replace>> - <</link>> - if (V.seePreg !== 0) { - | <<link "Preg">> - slave.clitSetting = "pregnancy"; - <<replace "#setting">> - slave.clitSetting - <</replace>> - <</link>> - } - | <<link "Pain">> - slave.clitSetting = "masochist"; - <<replace "#setting">> - slave.clitSetting - <</replace>> - <</link>> - | <<link "Sadism">> - slave.clitSetting = "sadist"; - <<replace "#setting">> - slave.clitSetting - <</replace>> - <</link>> - | <<link "Men">> - slave.clitSetting = "men"; - <<replace "#setting">> - slave.clitSetting - <</replace>> - <</link>> - | <<link "Anti-men">> - slave.clitSetting = "anti-men"; - <<replace "#setting">> - slave.clitSetting - <</replace>> - <</link>> - | <<link "Women">> - slave.clitSetting = "women"; - <<replace "#setting">> - slave.clitSetting - <</replace>> - <</link>> - | <<link "Anti-women">> - slave.clitSetting = "anti-women"; - <<replace "#setting">> - slave.clitSetting - <</replace>> - <</link>> - | <<link "All sex">> - slave.clitSetting = "all"; - <<replace "#setting">> - slave.clitSetting - <</replace>> - <</link>> - | <<link "No sex">> - slave.clitSetting = "none"; - <<replace "#setting">> - slave.clitSetting - <</replace>> - <</link>> - </div> - } - - if (slave.voice !== 0) { - <br>Speech rules: ''<span id="speechRules">slave.rules.speech</span>.'' - <<link "Restrictive">> - slave.rules.speech = "restrictive"; - <<replace "#speechRules">> - slave.rules.speech - <</replace>> - <</link>> - | - <<link "Permissive">> - slave.rules.speech = "permissive"; - <<replace "#speechRules">> - slave.rules.speech - <</replace>> - <</link>> - if (slave.accent > 0 && slave.accent < 4) {| - <<link "Accent elimination">> - slave.rules.speech = "accent elimination"; - <<replace "#speechRules">> - slave.rules.speech - <</replace>> - <</link>> - } else if (slave.accent > 3) {| - <<link "Language lessons">> - slave.rules.speech = "language lessons"; - <<replace "#speechRules">> - slave.rules.speech - <</replace>> - <</link>> - } - } - - <br> - Relationship rules: ''<span id="relationshipRules">slave.rules.relationship</span>.'' - <<link "Restrictive">> - slave.rules.relationship = "restrictive"; - <<replace "#relationshipRules">> - slave.rules.relationship - <</replace>> - <</link>> - | - <<link "Just friends">> - slave.rules.relationship = "just friends"; - <<replace "#relationshipRules">> - slave.rules.relationship - <</replace>> - <</link>> - | - <<link "Permissive">> - slave.rules.relationship = "permissive"; - <<replace "#relationshipRules">> - slave.rules.relationship - <</replace>> - <</link>> - - if (V.studio === 1) { - - <br><br>__Media__:<br> - if (slave.porn.prestige === 3) { - //V.He is so prestigious in the realm of slave.porn.fameType porn that V.his fame is self-sustaining.// - } else if (slave.porn.feed === 0) { - r += `The media hub is not releasing highlights of V.his sex life. [[Release|Slave Interact][slave.porn.feed = 1]] `; - } else { - r += `The media hub is releasing highlights of V.his sex life `; - if (slave.porn.spending < 500) { - to those who can find it - } else if (slave.porn.spending < 2500) { - on several websites - } else if (slave.porn.spending > 5000) { - through your old distributor - } else { - on many websites - }. - if (slave.porn.spending === 0) { - [[Halt|Slave Interact][slave.porn.feed = 0, slave.porn.focus = "none"]] | - [[Publicize|Slave Interact][slave.porn.spending += 1000]] - //Will cost ${cashFormat(1000)} weekly.// - } else { - <<textbox "_newPornSpending" slave.porn.spending>> - weekly is spent to publicize them. [[Save changes|Slave Interact][slave.porn.spending = Number(_newPornSpending) || 0]] | - [[Halt|Slave Interact][slave.porn.feed = 0, slave.porn.spending = 0, slave.porn.focus = "none", V.PCSlutContacts = 1]] | - if (slave.porn.spending < 5000) { - [[Increase|Slave Interact][slave.porn.spending += 1000]] | - } - [[Decrease|Slave Interact][slave.porn.spending -= 1000]] - if (slave.porn.spending > 5000) { - let _warn = 1; - } - slave.porn.spending = Number(slave.porn.spending) || 0; - slave.porn.spending = Math.clamp(Math.ceil(slave.porn.spending/1000)*1000, 0, 5000); - if (_warn) {<br>//Spending more than ${cashFormat(5000)>> - weekly will have no effect.// - <</if} - if (V.PC.career === "escort") { - <br> - r += `You retain some contacts from your past life in the industry that may be willing to cut you some discounts should you return to it. `; - if (V.PCSlutContacts !== 2) { - r += `You are not baring your body for all to see. `; - [[Star in porn for a discount|Slave Interact][V.PCSlutContacts = 2]] } else { - r += `You are starring in hardcore porn once more. `; - [[Stop doing porn for a discount|Slave Interact][V.PCSlutContacts = 1]] + r += `${His} smart frenulum piercing `; + if (slave.vaginalAccessory === "smart bullet vibrator") { + and smart bullet vibrator are + } else { + is + } + set to } - } - } - - if (V.studioFeed === 1) { - <br> - if (slave.porn.viewerCount < 100) { - r += `V.He lacks the fame in porn needed to discern what V.his feed is getting tagged as. `; } else { - if (slave.porn.prestige > 0) { - r += `V.He is known for slave.porn.fameType porn `; - if (slave.porn.prestige > 1) { - and viewers have grown to expect it from V.him - }. - } - if (slave.porn.focus === "none") { - r += `You are allowing V.his viewers to guide the direction of V.his content. `; + r += `${His} smart bullet vibe is set to `; + } < strong > < span id = "setting" > slave.clitSetting < /span></strong > . << + link "Vanilla" >> + slave.clitSetting = "vanilla"; << + replace "#setting" >> + slave.clitSetting << + /replace>> << / + link >> | + << + link "Oral" >> + slave.clitSetting = "oral"; << + replace "#setting" >> + slave.clitSetting << + /replace>> << / + link >> | + << + link "Anal" >> + slave.clitSetting = "anal"; << + replace "#setting" >> + slave.clitSetting << + /replace>> << / + link >> | + << + link "Boobs" >> + slave.clitSetting = "boobs"; << + replace "#setting" >> + slave.clitSetting << + /replace>> << / + link >> | + << + link "Sub" >> + slave.clitSetting = "submissive"; << + replace "#setting" >> + slave.clitSetting << + /replace>> << / + link >> | + << + link "Dom" >> + slave.clitSetting = "dom"; << + replace "#setting" >> + slave.clitSetting << + /replace>> << / + link >> | + << + link "Humiliation" >> + slave.clitSetting = "humiliation"; << + replace "#setting" >> + slave.clitSetting << + /replace>> << / + link >> + if (V.seePreg !== 0) { + | + << + link "Preg" >> + slave.clitSetting = "pregnancy"; << + replace "#setting" >> + slave.clitSetting << + /replace>> << / + link >> + } | + << + link "Pain" >> + slave.clitSetting = "masochist"; << + replace "#setting" >> + slave.clitSetting << + /replace>> << / + link >> | + << + link "Sadism" >> + slave.clitSetting = "sadist"; << + replace "#setting" >> + slave.clitSetting << + /replace>> << / + link >> | + << + link "Men" >> + slave.clitSetting = "men"; << + replace "#setting" >> + slave.clitSetting << + /replace>> << / + link >> | + << + link "Anti-men" >> + slave.clitSetting = "anti-men"; << + replace "#setting" >> + slave.clitSetting << + /replace>> << / + link >> | + << + link "Women" >> + slave.clitSetting = "women"; << + replace "#setting" >> + slave.clitSetting << + /replace>> << / + link >> | + << + link "Anti-women" >> + slave.clitSetting = "anti-women"; << + replace "#setting" >> + slave.clitSetting << + /replace>> << / + link >> | + << + link "All sex" >> + slave.clitSetting = "all"; << + replace "#setting" >> + slave.clitSetting << + /replace>> << / + link >> | + << + link "No sex" >> + slave.clitSetting = "none"; << + replace "#setting" >> + slave.clitSetting << + /replace>> << / + link >> < + /div> + } + + if (slave.voice !== 0) { + < + br > Speech rules: '' < span id = "speechRules" > slave.rules.speech < /span>.'' << + link "Restrictive" >> + slave.rules.speech = "restrictive"; << + replace "#speechRules" >> + slave.rules.speech << + /replace>> << / + link >> | + << + link "Permissive" >> + slave.rules.speech = "permissive"; << + replace "#speechRules" >> + slave.rules.speech << + /replace>> << / + link >> + if (slave.accent > 0 && slave.accent < 4) { + | + << + link "Accent elimination" >> + slave.rules.speech = "accent elimination"; << + replace "#speechRules" >> + slave.rules.speech << + /replace>> << / + link >> + } else if (slave.accent > 3) { + | + << + link "Language lessons" >> + slave.rules.speech = "language lessons"; << + replace "#speechRules" >> + slave.rules.speech << + /replace>> << / + link >> + } + } + + < + br > + Relationship rules: '' < span id = "relationshipRules" > slave.rules.relationship < /span>.'' << + link "Restrictive" >> + slave.rules.relationship = "restrictive"; << + replace "#relationshipRules" >> + slave.rules.relationship << + /replace>> << / + link >> | + << + link "Just friends" >> + slave.rules.relationship = "just friends"; << + replace "#relationshipRules" >> + slave.rules.relationship << + /replace>> << / + link >> | + << + link "Permissive" >> + slave.rules.relationship = "permissive"; << + replace "#relationshipRules" >> + slave.rules.relationship << + /replace>> << / + link >> + + if (V.studio === 1) { + + < + br > < br > __Media__: < br > + if (slave.porn.prestige === 3) { + //${He} is so prestigious in the realm of slave.porn.fameType porn that ${his} fame is self-sustaining.// + } else if (slave.porn.feed === 0) { + r += `The media hub is not releasing highlights of ${his} sex life. [[Release|Slave Interact][slave.porn.feed = 1]] `; + } else { + r += `The media hub is releasing highlights of ${his} sex life `; + if (slave.porn.spending < 500) { + to those who can find it + } else if (slave.porn.spending < 2500) { + on several websites + } else if (slave.porn.spending > 5000) { + through your old distributor + } else { + on many websites + }. + if(slave.porn.spending === 0) { + [ + [Halt | Slave Interact][slave.porn.feed = 0, slave.porn.focus = "none"] + ] | [ + [Publicize | Slave Interact][slave.porn.spending += 1000] + ] + //Will cost ${cashFormat(1000)} weekly.// } else { - r += `You are focusing attention on the slave.porn.focus aspect of V.his content. `; + << + textbox "_newPornSpending" + slave.porn.spending >> + weekly is spent to publicize them. [ + [Save changes | Slave Interact][slave.porn.spending = Number(_newPornSpending) || 0] + ] | [ + [Halt | Slave Interact][slave.porn.feed = 0, slave.porn.spending = 0, slave.porn.focus = "none", V.PCSlutContacts = 1] + ] | + if (slave.porn.spending < 5000) { + [ + [Increase | Slave Interact][slave.porn.spending += 1000] + ] | + } + [ + [Decrease | Slave Interact][slave.porn.spending -= 1000] + ] + if (slave.porn.spending > 5000) { + let _warn = 1; + } + slave.porn.spending = Number(slave.porn.spending) || 0; + slave.porn.spending = Math.clamp(Math.ceil(slave.porn.spending / 1000) * 1000, 0, 5000); + if (_warn) { + < + br > //Spending more than ${cashFormat(5000)>> + weekly will have no effect. // + << + /if} + if (V.PC.career === "escort") { + < + br > + r += `You retain some contacts from your past life in the industry that may be willing to cut you some discounts should you return to it. `; + if (V.PCSlutContacts !== 2) { + r += `You are not baring your body for all to see. `; + [ + [Star in porn + for a discount | Slave Interact + ][V.PCSlutContacts = 2] + ] + } else { + r += `You are starring in hardcore porn once more. `; + [ + [Stop doing porn + for a discount | Slave Interact + ][V.PCSlutContacts = 1] + ] + } + } + } + + if (V.studioFeed === 1) { + < + br > + if (slave.porn.viewerCount < 100) { + r += `${He} lacks the fame in porn needed to discern what ${his} feed is getting tagged as. `; + } else { + if (slave.porn.prestige > 0) { + r += `${He} is known for slave.porn.fameType porn `; + if (slave.porn.prestige > 1) { + and viewers have grown to expect it from V.him + }. + } + if (slave.porn.focus === "none") { + r += `You are allowing ${his} viewers to guide the direction of ${his} content. `; + } else { + r += `You are focusing attention on the slave.porn.focus aspect of ${his} content. `; + } + $ { App.Porn.genreChoiceLinks("Slave Interact", slave) } | [ + [No focus | Slave Interact][slave.porn.focus = "none"] + ] + } + } } - ${App.Porn.genreChoiceLinks("Slave Interact", slave)} | [[No focus|Slave Interact][slave.porn.focus = "none"]] } } - } - } - } -}}}}} + } + } + } + } + }*/ +} App.UI.SlaveInteract.generateRows = function(array, slave, category, accessCheck = false) { // category should be in the form of slave.category, the thing we want to update. let row = document.createElement('span'); for (let i = 0; i < array.length; i++) { @@ -2217,6 +2474,7 @@ App.UI.SlaveInteract.generateRows = function(array, slave, category, accessCheck Object.assign(V, arrayOption.update); } App.UI.Wardrobe.refreshAll(slave); + App.UI.SlaveInteract.refreshAll(slave); return; } }; @@ -2226,5 +2484,8 @@ App.UI.SlaveInteract.refreshAll = function(slave) { App.UI.SlaveInteract.fertility(slave); App.UI.SlaveInteract.useSlaveDisplay(slave); App.UI.SlaveInteract.drugs(slave); + App.UI.SlaveInteract.curatives(slave); + App.UI.SlaveInteract.aphrodisiacs(slave); + App.UI.SlaveInteract.incubator(slave); + App.UI.SlaveInteract.nursery(slave); }; - \ No newline at end of file diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw index 84918c1f4c5..8306ad87550 100644 --- a/src/uncategorized/slaveInteract.tw +++ b/src/uncategorized/slaveInteract.tw @@ -239,124 +239,20 @@ <span id="curatives"></span> <script>App.UI.SlaveInteract.curatives(V.activeSlave)</script> - +<span id="aphrodisiacs"></span> +<script>App.UI.SlaveInteract.aphrodisiacs(V.activeSlave)</script> -Aphrodisiacs: <span id="aphrodisiacs"><strong><<if $activeSlave.aphrodisiacs > 1>>extreme<<elseif $activeSlave.aphrodisiacs > 0>>applied<<elseif $activeSlave.aphrodisiacs === -1>>anaphrodisiacs<<else>>none<</if>></strong></span>. - <<link "None">><<set $activeSlave.aphrodisiacs = 0>><<replace "#aphrodisiacs">><strong>none</strong><</replace>><</link>> - | <<link "Apply">><<set $activeSlave.aphrodisiacs = 1>><<replace "#aphrodisiacs">><strong>applied</strong><</replace>><</link>> - | <<link "Extreme">><<set $activeSlave.aphrodisiacs = 2>><<replace "#aphrodisiacs">><strong>extreme</strong><</replace>><</link>> - | <<link "Anaphrodisiacs">><<set $activeSlave.aphrodisiacs = -1>><<replace "#aphrodisiacs">><strong>anaphrodisiacs</strong><</replace>><</link>> -<br> <span id="fertilityblock"></span> <script>App.UI.SlaveInteract.fertility(V.activeSlave)</script> -<<set $reservedChildren = FetusGlobalReserveCount("incubator")>> -<<set $reservedChildrenNursery = FetusGlobalReserveCount("nursery")>> -<<set _reservedIncubator = WombReserveCount($activeSlave, "incubator")>> -<<set _reservedNursery = WombReserveCount($activeSlave, "nursery")>> -<<set _WL = $activeSlave.womb.length>> - -<<if $incubator > 0>> - <<if $activeSlave.preg > 0 && $activeSlave.broodmother == 0 && $activeSlave.pregKnown == 1 && $activeSlave.eggType == "human">> - <<if ($activeSlave.assignment == "work in the dairy" && $dairyPregSetting > 0) || ($activeSlave.assignment == "work in the farmyard" && $farmyardBreeding > 0)>> - <<else>> - <br> - <<if _WL - _reservedNursery == 0>> - //$His children are already reserved for $nurseryName// - <<else>> - <<set $freeTanks = ($incubator-$tanks.length)>> - <<if _reservedIncubator > 0>> - <<if _WL == 1>> - $His child will be placed in $incubatorName. - <<elseif _reservedIncubator < _WL>> - _reservedIncubator of $his children will be placed in $incubatorName. - <<elseif _WL == 2>> - Both of $his children will be placed in $incubatorName. - <<else>> - All _reservedIncubator of $his children will be placed in $incubatorName. - <</if>> - <<if (_reservedIncubator + _reservedNursery < _WL) && ($reservedChildren < $freeTanks)>> - <<link "Keep another child" "Slave Interact">><<set WombAddToGenericReserve($activeSlave, "incubator", 1)>><<set $slaves[$slaveIndices[$activeSlave.ID]] = $activeSlave>><<set $reservedChildren = FetusGlobalReserveCount("incubator")>><</link>> - <<if _reservedIncubator > 0>> - | <<link "Keep one less child" "Slave Interact">><<set WombCleanGenericReserve($activeSlave, "incubator", 1)>><<set $slaves[$slaveIndices[$activeSlave.ID]] = $activeSlave>><<set $reservedChildren = FetusGlobalReserveCount("incubator")>><</link>> - <</if>> - <<if _reservedIncubator > 1>> - | <<link "Keep none of $his children" "Slave Interact">><<set WombCleanGenericReserve($activeSlave, "incubator", 9999)>><<set $slaves[$slaveIndices[$activeSlave.ID]] = $activeSlave>><<set $reservedChildren = FetusGlobalReserveCount("incubator")>><</link>> - <</if>> - <<if ($reservedChildren + _WL - _reservedIncubator) <= $freeTanks>> - | <<link "Keep the rest of $his children" "Slave Interact">><<set WombAddToGenericReserve($activeSlave, "incubator", 9999)>><<set $slaves[$slaveIndices[$activeSlave.ID]] = $activeSlave>><<set $reservedChildren = FetusGlobalReserveCount("incubator")>><</link>> - <</if>> - <<elseif (_reservedIncubator == _WL) || ($reservedChildren == $freeTanks) || (_reservedIncubator - _reservedNursery >= 0)>> - <<link "Keep one less child" "Slave Interact">><<set WombCleanGenericReserve($activeSlave, "incubator", 1)>><<set $slaves[$slaveIndices[$activeSlave.ID]] = $activeSlave>><<set $reservedChildren = FetusGlobalReserveCount("incubator")>><</link>> - <<if _reservedIncubator > 1>> - | <<link "Keep none of $his children" "Slave Interact">><<set WombCleanGenericReserve($activeSlave, "incubator", 9999)>><<set $slaves[$slaveIndices[$activeSlave.ID]] = $activeSlave>><<set $reservedChildren = FetusGlobalReserveCount("incubator")>><</link>> - <</if>> - <</if>> - <<elseif $reservedChildren < $freeTanks>> - $He is pregnant and you have <<if $freeTanks == 1>>an<</if>> @@.lime;available aging tank<<if $freeTanks > 1>>s<</if>>.@@ - <<set _cCount = (_WL > 1 ? "a" : "the")>> - <<link "Keep _cCount child" "Slave Interact">><<set WombAddToGenericReserve($activeSlave, "incubator", 1)>><<set $slaves[$slaveIndices[$activeSlave.ID]] = $activeSlave>><<set $reservedChildren = FetusGlobalReserveCount("incubator")>><</link>> - <<if (_WL > 1) && ($reservedChildren + _WL) <= $freeTanks>> - | <<link "Keep all of $his children" "Slave Interact">><<set WombAddToGenericReserve($activeSlave, "incubator", 9999)>><<set $slaves[$slaveIndices[$activeSlave.ID]] = $activeSlave>><<set $reservedChildren = FetusGlobalReserveCount("incubator")>><</link>> - <</if>> - <<elseif $reservedChildren == $freeTanks>> - You have no available tanks for $his children. - <</if>> - <</if>> - <</if>> - <</if>> -<</if>> -<<if $nursery > 0>> - <<if $activeSlave.preg > 0 && $activeSlave.broodmother == 0 && $activeSlave.pregKnown == 1 && $activeSlave.eggType == "human">> - <<if ($activeSlave.assignment == "work in the dairy" && $dairyPregSetting > 0) || ($activeSlave.assignment == "work in the farmyard" && $farmyardBreeding > 0)>> - <<else>> - <br> - <<if _WL - _reservedIncubator == 0>> - <<set $reservedChildren = 0>> - //$His children are already reserved for $incubatorName// - <<else>> - <<set $freeCribs = ($nursery-$cribs.length)>> - <<if _reservedNursery > 0>> - <<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))>> - <<link "Keep another child" "Slave Interact">><<set WombAddToGenericReserve($activeSlave, "nursery", 1)>><<set $slaves[$slaveIndices[$activeSlave.ID]] = $activeSlave>><<set $reservedChildren = FetusGlobalReserveCount("nursery")>><</link>> - <<if _reservedNursery > 0>> - | <<link "Keep one less child" "Slave Interact">><<set WombCleanGenericReserve($activeSlave, "nursery", 1)>><<set $slaves[$slaveIndices[$activeSlave.ID]] = $activeSlave>><<set $reservedChildren = FetusGlobalReserveCount("nursery")>><</link>> - <</if>> - <<if _reservedNursery > 1>> - | <<link "Keep none of $his children" "Slave Interact">><<set WombCleanGenericReserve($activeSlave, "nursery", 9999)>><</link>> - <</if>> - <<if ($reservedChildrenNursery + _WL - _reservedNursery) <= $freeCribs>> - | <<link "Keep the rest of $his children" "Slave Interact">><<set WombAddToGenericReserve($activeSlave, "nursery", 9999)>><</link>> - <</if>> - <<elseif (_reservedNursery == _WL) || ($reservedChildrenNursery == $freeCribs) || (_reservedNursery - _reservedIncubator >= 0)>> - <<link "Keep one less child" "Slave Interact">><<set WombCleanGenericReserve($activeSlave, "nursery", 1)>><<set $slaves[$slaveIndices[$activeSlave.ID]] = $activeSlave>><<set $reservedChildren = FetusGlobalReserveCount("nursery")>><</link>> - <<if _reservedNursery > 1>> - | <<link "Keep none of $his children" "Slave Interact">><<set WombCleanGenericReserve($activeSlave, "nursery", 9999)>><<set $slaves[$slaveIndices[$activeSlave.ID]] = $activeSlave>><<set $reservedChildren = FetusGlobalReserveCount("nursery")>><</link>> - <</if>> - <</if>> - <<elseif $reservedChildrenNursery < $freeCribs>> - $He is pregnant and you have <<if $freeCribs == 1>>an<</if>> @@.lime;available room<<if $freeCribs > 1>>s<</if>>@@ in $nurseryName. - <<set _cCount = (_WL > 1 ? "a" : "the")>> - <<link "Keep _cCount child" "Slave Interact">><<set WombAddToGenericReserve($activeSlave, "nursery", 1)>><<set $slaves[$slaveIndices[$activeSlave.ID]] = $activeSlave>><<set $reservedChildren = FetusGlobalReserveCount("nursery")>><</link>> - <<if (_WL > 1) && ($reservedChildrenNursery + _WL) <= $freeCribs>> - | <<link "Keep all of $his children" "Slave Interact">><<set WombAddToGenericReserve($activeSlave, "nursery", 9999)>><<set $slaves[$slaveIndices[$activeSlave.ID]] = $activeSlave>><<set $reservedChildren = FetusGlobalReserveCount("nursery")>><</link>> - <</if>> - <<elseif $reservedChildrenNursery == $freeCribs>> - You have no available rooms for $his children. - <</if>> - <</if>> - <</if>> - <</if>> -<</if>> +<span id="incubator"></span> +<script>App.UI.SlaveInteract.incubator(V.activeSlave)</script> + +<span id="nursery"></span> +<script>App.UI.SlaveInteract.nursery(V.activeSlave)</script> + +<br><br><br> Old shit: <br> + <<if $propOutcome == 1 && $arcologies[0].FSRestart != "unset">> <<if $activeSlave.breedingMark == 0 && $activeSlave.fuckdoll == 0 && $activeSlave.eggType == "human" && isFertile($activeSlave) && $activeSlave.preg == 0>> -- GitLab