diff --git a/src/endWeek/saRules.js b/src/endWeek/saRules.js index d8afdf576d7edb2d2a7a7baa8925a93c9ca5560b..ab26cf855f3cf8413ac562de330c408ee7ad83c6 100644 --- a/src/endWeek/saRules.js +++ b/src/endWeek/saRules.js @@ -138,14 +138,14 @@ window.saRules = (function() { r += `happily <span class="mediumaquamarine">avails ${himself}</span> of your permission to ${rapeFetish(slave)} ${rapeDiscoversFetish(slave)}`; slave.trust++, slave.need = 0; } - r += `prefers to masturbate rather than asking other slaves for sex or giving free samples, <span class="mediumaquamarine">slightly reducing ${his} fear</span> of you. `; } else { if (slave.devotion <= 20) { if (slave.trust > -20) { if (release === "permissive") { - r += `refuses to ask other slaves for sex, and is <span class="gold">severely punished</span> for illicit masturbation. `; + r += `prefers to masturbate rather than asking other slaves for sex or giving free samples, <span class="mediumaquamarine">slightly reducing ${his} fear</span> of you. `; slave.trust++, slave.need = 0; } else { + r += `refuses to ask other slaves for sex, and is <span class="gold">severely punished</span> for illicit masturbation. `; slave.trust -= 2, slave.need -= 10; } } else { diff --git a/src/facilities/nursery/nursery.tw b/src/facilities/nursery/nursery.tw index 5baea07ffad06cc01e407cd5947b0bbbe9e44e3c..aedf38c8ca85958975d9e93789db5f17fabd3c2d 100644 --- a/src/facilities/nursery/nursery.tw +++ b/src/facilities/nursery/nursery.tw @@ -8,7 +8,7 @@ <<set $nurseryNameCaps = $nurseryName.replace("the ", "The ")>> <</if>> -<<set $nurseryBabies = $cribs.length, $freeCribs = $nursery - $nurseryBabies, _SL = $slaves.length, _eligibility = 0, $reservedChildren = FetusGlobalReserveCount("incubator"), $reservedChildrenNursery = FetusGlobalReserveCount("nursery")>> +<<set $readyChildren = 0, $nurseryBabies = $cribs.length, $freeCribs = $nursery - $nurseryBabies, _SL = $slaves.length, _eligibility = 0, $reservedChildren = FetusGlobalReserveCount("incubator"), $reservedChildrenNursery = FetusGlobalReserveCount("nursery")>> $nurseryNameCaps <<switch $nurseryDecoration>> @@ -410,5 +410,23 @@ Target age for release: <<textbox "$targetAgeNursery" $targetAgeNursery "Nursery <<= App.Facilities.Nursery.childList()>> <</if>> +/* +FIXME: not sure if this works +<<set $newSlavePool = []>> +<<for _nur = 0; _nur < $cribs.length; _nur++>> + <<if $cribs[_nur].growTime <= 0>> + <<set $nurseryOldID = $cribs[_nur].ID>> /* single slave case *//* + <<set _tempObject = {object: $cribs[_nur], ID: $cribs[_nur].ID}>> + <<set $newSlavePool.push(clone(_tempObject))>> + <<run $cribs.splice(_nur, 1)>> + <<set _nur-->> + <</if>> +<</for>> +<<if $newSlavePool.length == 1>> + <<set $readySlave = $newSlavePool[0].object>> + <<set $newSlavePool = 0>> +<</if>> +*/ + <br><br> Rename $nurseryName: <<textbox "$nurseryName" $nurseryName "Nursery">> //Use a noun or similar short phrase// diff --git a/src/facilities/nursery/nurseryRetrievalWorkaround.tw b/src/facilities/nursery/nurseryRetrievalWorkaround.tw index 14de23de72037148b10b7f9a76420b9bb1fb503a..56cf180119c836dbee84bb96fa5b5ad0c96a6f59 100644 --- a/src/facilities/nursery/nurseryRetrievalWorkaround.tw +++ b/src/facilities/nursery/nurseryRetrievalWorkaround.tw @@ -9,7 +9,7 @@ $readySlave.slaveName has been discharged from $nurseryName and is ready to beco <<set $nurseryBabies-->> <<include "Long Slave Description">> <<run newSlave($activeSlave)>> -<<set $activeSlave.ID = $IDNumber + $activeSlave.ID>> +<<set $slaves.push($activeSlave)>> <<set $nextLink = "AS Dump">> <<set $returnTo = "Main">> /* diff --git a/src/facilities/nursery/nurseryWidgets.js b/src/facilities/nursery/nurseryWidgets.js index 4305ef8ed4591f8bd63607986a6a3458835973de..a9d98b66ec4c81d2436e60d80078cec8b52ce818 100644 --- a/src/facilities/nursery/nurseryWidgets.js +++ b/src/facilities/nursery/nurseryWidgets.js @@ -15542,10 +15542,12 @@ App.Facilities.Nursery.childList = function() { return r; } - if (child.growTime <= 0) { + if (child.growTime <= 0 || child.actualAge >= V.targetAgeNursery) { r += `<br>`; r += `${He} is ready to leave ${V.nurseryName} and ${child.targetLocation === "slavery" ? `join your ménage` : `become a free citizen`}. `; - r += App.UI.passageLink(`${child.targetLocation === "slavery" ? `"Introduce ${him} to life as a slave"` : `"Set ${him} free"`}`, "Nursery Retrieval Workaround", V.readySlave = cribs.pluck([i], [i])); + r += `<<link ${child.targetLocation === "slavery" ? `"Introduce ${him} to life as a slave"` : `"Set ${him} free"`} "Nursery Retrieval Workaround">>`; // FIXME: figure out why App.UI.passageLink doesn't work here + V.readySlave = cribs.pluck([i], [i]); + r += `<</link>>`; } else { r += `<br>`; r += `${He} is to continue staying in ${V.nurseryName} for another ${years(weeksLeft)}. @@ -15561,6 +15563,7 @@ App.Facilities.Nursery.childList = function() { * @param {object} child */ App.Facilities.Nursery.infantToChild = function infantToChild(child) { + child.ID = State.variables.IDNumber + child.ID; child.abortionTat = -1, child.accent = 0, child.addict = 0, @@ -16246,7 +16249,7 @@ App.Facilities.Nursery.newChild = function newChild(child) { child.objectReflexive = "herself"; child.noun = "girl"; } - child.origin = `${He} was born and raised in your arcology. `; + child.origin = `$He was born and raised in your arcology. `; child.targetLocation = "slavery"; child.growTime = V.targetAgeNursery * 52; V.cribs.push(child); @@ -19355,7 +19358,7 @@ App.Facilities.Nursery.nurseryReport = function nurseryReport() { function choosesOwnJob(slave) { let r = ``; - if (V.universalRulesAssignsSelfFacility && slave.devotion > 50 && canWalk(slave) && canSee(slave) && sexualQuirk === "caring" && V.nurseryNannies > V.nurserySlaves) { + if (V.universalRulesAssignsSelfFacility && slave.devotion > 50 && canWalk(slave) && canSee(slave) && slave.sexualQuirk === "caring" && V.nurseryNannies > V.nurserySlaves) { slave.choosesOwnAssignmentText += ` enjoys taking care of children, so ${he} decides to work in ${V.nurseryName}. `; r = slave.choosesOwnAssignmentText; assignJob(slave, "work as a nanny"); diff --git a/src/facilities/nursery/nurseryWorkaround.tw b/src/facilities/nursery/nurseryWorkaround.tw index 9b127090297e7c21bcfc4c65a21c117aa6cd545f..1dc4c83a65df47a0bb389fadfeed62485d4973a4 100644 --- a/src/facilities/nursery/nurseryWorkaround.tw +++ b/src/facilities/nursery/nurseryWorkaround.tw @@ -2,5 +2,5 @@ <<if $cribs.length < $nursery>> <<run App.Facilities.Nursery.newChild($activeChild)>> - <<= App.Facilities.Nursery.nameChild($activeChild)>> + /*<<= App.Facilities.Nursery.nameChild($activeChild)>>*/ <</if>> \ No newline at end of file diff --git a/src/js/assayJS.js b/src/js/assayJS.js index 4dffa6e6da974fe2d19ed296a451fafb804058a1..d13234ff2a45d83d971b5e858c20e021292fc76a 100644 --- a/src/js/assayJS.js +++ b/src/js/assayJS.js @@ -246,7 +246,11 @@ window.newSlave = function newSlave(slave) { slave.dullIntelligence = null; } - assignJob(slave, slave.assignment); + if (slave.assignment) { + assignJob(slave, slave.assignment); + } else { + slave.assignment = "choose her own job"; + } /** do not run the Rules Assistant before adding the new slave to the slaves list! **/ if (V.ui !== "start" && V.universalRulesNewSlavesRA === 1 && V.rulesAssistantAuto !== 0) { diff --git a/src/pregmod/widgets/seBirthWidgets.tw b/src/pregmod/widgets/seBirthWidgets.tw index abc017a10c3f97bd2e6c4e6456b434c2b67cdd2d..f050a1dd36592cad4b6a7335609edead4abbe3d0 100644 --- a/src/pregmod/widgets/seBirthWidgets.tw +++ b/src/pregmod/widgets/seBirthWidgets.tw @@ -951,7 +951,7 @@ All in all, understands that this is the best possible outcome for the offspring of a slave, and will be @@.hotpink;overjoyed.@@ <<set $activeSlave.devotion += 6>> <<elseif $activeSlave.devotion > 20>> - will miss $his child<<if _curBabies > 1>>ren<</if>>, but will be @@.hotpink;very grateful,@@ since <<print $he>>'ll understand this is the best possible outcome for a slave mother. + will miss $his child<<if _curBabies > 1>>ren<</if>>, but will be @@.hotpink;very grateful,@@ since $he'll understand this is the best possible outcome for a slave mother. <<set $activeSlave.devotion += 6>> <<else>> will resent being separated from $his child<<if _curBabies > 1>>ren<</if>>, but @@.hotpink;should understand and be grateful@@ that this is the best possible outcome here. @@ -987,7 +987,7 @@ All in all, understands that this is the best possible outcome for the offspring of slave, and will be @@.hotpink;overjoyed.@@ <<set $slaves[$i].devotion += 6>> <<elseif $slaves[$i].devotion > 20>> - will miss $his child<<if _curBabies > 1>>ren<</if>>, but will be @@.hotpink;very grateful,@@ since <<print $he>>'ll understand this is the best possible outcome for a slave mother. + will miss $his child<<if _curBabies > 1>>ren<</if>>, but will be @@.hotpink;very grateful,@@ since $he'll understand this is the best possible outcome for a slave mother. <<set $slaves[$i].devotion += 6>> <<else>> will resent being separated from $his child<<if _curBabies > 1>>ren<</if>>, but @@.hotpink;should understand and be grateful@@ that this is the best possible outcome here. @@ -1016,7 +1016,7 @@ All in all, $slaves[$i].slaveName is @@.mediumorchid;devastated@@ by your sudden decision to sell $his child<<if _curBabies > 1>>ren<</if>> instead of having <<if _curBabies > 1>>them<<else>>it<</if>> cared for. $His mind struggles to comprehend @@.gold;such betrayal.@@ <<set $slaves[$i].trust -= 10, $slaves[$i].devotion -= 10>> <<else>> - For a moment, $slaves[$i].slaveName thought $he saw a glimmer of good in you; @@.mediumorchid;$he was clearly wrong.@@ $His mind struggles to comprehend @@.gold;why $he could ever even thing of trusting such a person.@@ + For a moment, $slaves[$i].slaveName thought $he saw a glimmer of good in you; @@.mediumorchid;$he was clearly wrong.@@ $His mind struggles to comprehend @@.gold;why $he could ever even think of trusting such a person.@@ <<set $slaves[$i].trust -= 30, $slaves[$i].devotion -= 30>> <</if>> <<set $slaveOrphanageTotal -= _curBabies>> diff --git a/src/uncategorized/buildingWidgets.tw b/src/uncategorized/buildingWidgets.tw index f8c7b5211eedfd38e699a436d319b84e22ea07d6..d8dce067612aeaa230b3f07b22a8d79030e994de 100644 --- a/src/uncategorized/buildingWidgets.tw +++ b/src/uncategorized/buildingWidgets.tw @@ -148,7 +148,7 @@ if(!Macro.has('sectorblock')) { <<if $dojo > 1>>[[Armory|BG Select]] <<if $Bodyguard != 0>>(BG)<</if>> <</if>> <<if $servantsQuarters>> <<print ServantQuartersUIName()>> ($servantsQuartersSlaves/$servantsQuarters<<if $Stewardess>>, L<</if>>)<</if>> <<if $spa>> <<print SpaUIName()>> ($spaSlaves/$spa<<if $Attendant>>, L<</if>>)<</if>> - <<if $nursery>> <<print NurseryUIName()>> (<<if $nursery-$nurseryBabies == 0>>No empty rooms<<elseif $nursery-$nurseryBabies == 1>>1 empty room<<else>><<print $nursery-$nurseryBabies>> empty rooms<</if>>, $nurserySlaves/$nurseryNannies<<if $Matron>>, L<</if>>)<</if>> + <<if $nursery>> <<print NurseryUIName()>> (<<if $nursery-$nurseryBabies == 0>>No empty rooms<<elseif $nursery-$nurseryBabies == 1>>1 empty room<<else>><<print $nursery-$nurseryBabies>> empty rooms<</if>>, $nurserySlaves/$nurseryNannies<<if $Matron>>, L<</if>>) <<if $readyChildren > 0>>@@.yellow;[!]@@<</if>> <</if>> <<if $clinic>> <<print ClinicUIName()>> ($clinicSlaves/$clinic<<if $Nurse>>, L<</if>>)<</if>> <<if $schoolroom>> <<print SchoolRoomUIName()>> ($schoolroomSlaves/$schoolroom<<if $Schoolteacher>>, L<</if>>)<</if>> <<if $cellblock>> <<print CellblockUIName()>> ($cellblockSlaves/$cellblock<<if $Wardeness>>, L<</if>>)<</if>> diff --git a/src/uncategorized/endWeek.tw b/src/uncategorized/endWeek.tw index f91070dc5a4a6c9e2d9daa904b98fd4028351f5f..3f512e7ff7bcee987a7ee7ac3bff674ef7da7298 100644 --- a/src/uncategorized/endWeek.tw +++ b/src/uncategorized/endWeek.tw @@ -87,7 +87,7 @@ c.actualAge++; } if (c.actualAge >= 3) { - c = App.Facilities.Nursery.infantToChild(c); + App.Facilities.Nursery.infantToChild(c); } })>> <</if>>