diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index 1867dda4c0116084553afb25ef8034e71c87af38..83efb9eb52a578af86c334c0da8a633d087b992f 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -130,13 +130,14 @@ <<if ndef $peacekeepers>> <<set $peacekeepers = 0>> <</if>> - <<if def $modestClothes>> <<unset $modestClothes>> <</if>> - <<if ndef $completedOrgans>> -<<set $completedOrgans = []>> + <<set $completedOrgans = []>> +<</if>> +<<if def $eventSlaves>> + <<unset $eventSlaves>> <</if>> /* pregmod stuff */ diff --git a/src/uncategorized/newSlaveIntro.tw b/src/uncategorized/newSlaveIntro.tw index bfe6c4df194d815e8640bfdfddc7a0d2af3e7048..bc67af4ce9388e88a34cfcc4e22bb387e18a6ed4 100644 --- a/src/uncategorized/newSlaveIntro.tw +++ b/src/uncategorized/newSlaveIntro.tw @@ -10,13 +10,11 @@ <<SlaveTitle $activeSlave>> <<if $specialSlave == 1>> - <<for $i = 0; $i < $heroSlaves.length; $i++>> - <<if $activeSlave.ID == $heroSlaves[$i].ID>> - <<set $heroSlaves.deleteAt($i)>> - <<set $specialSlave = 0>> - <<break>> - <</if>> - <</for>> + <<set $i = $heroSlaves.findIndex(function(s) { return s.ID == $activeSlave.ID; })>> + <<if $i != -1>> + <<set $heroSlaves.deleteAt($i)>> + <</if>> + <<set $specialSlave = 0>> <</if>> <br> @@ -503,7 +501,7 @@ The legalities completed, ''__@@.pink;<<SlaveFullName $activeSlave>>@@__'' <<if <</if>> <<elseif $arcologies[0].FSChineseRevivalist >= 50>> <<if $activeSlave.intelligenceImplant == 1>> - Though she knows it's not a truly authentic ancient Chinese restoration, her educated mind grasps the potential benefits of ancient Confucian philosophy for slaves, and she @@.mediumaquamarine;hopes@@ your arcology at least maintains some pretence of order and conservatism. + Though she knows it's not a truly authentic ancient Chinese restoration, her educated mind grasps the potential benefits of ancient Confucian philosophy for slaves, and she @@.mediumaquamarine;hopes@@ your arcology at least maintains some pretense of order and conservatism. <<set $activeSlave.trust += 2>> <</if>> <</if>> @@ -1077,7 +1075,7 @@ The legalities completed, ''__@@.pink;<<SlaveFullName $activeSlave>>@@__'' <<if She will never bear children, and will @@.mediumorchid;remember her status@@ with every fucking she receives. Your absolute power over her body is rightfully @@.gold;terrifying.@@ <<set $activeSlave.trust -= 20, $activeSlave.devotion -= 50>> <</if>> - Society @@.green;approves@@ of your promptly rendering her sterile; this advances the idea that all only the elite should breed. + Society @@.green;approves@@ of your promptly rendering her sterile; this advances the idea that only the elite should breed. <<FSChange "Eugenics" 1>> <<if $activeSlave.pregKnown == 1>> Since you snuffed out an unworthy life in the process, the sterilization has an even @@.green;bigger impact.@@ diff --git a/src/uncategorized/officeDescription.tw b/src/uncategorized/officeDescription.tw index 51cd28d6af2f884f27c3fb988661c3929feb40a7..bd8ffa9b7e723fe3768b5457273829dec34eb230 100644 --- a/src/uncategorized/officeDescription.tw +++ b/src/uncategorized/officeDescription.tw @@ -6,14 +6,9 @@ <<if $clubAdsSpending >= 5000>> A corner of your desk is piled with sample merchandise from the campaign promoting your club. - <<set $eventSlaves = []>> - <<for _odi = 0; _odi < $slaves.length; _odi++>> - <<if ($slaves[_odi].assignment == "serve in the club") && canWalk($slaves[_odi])>> - <<set $eventSlaves.push($slaves[_odi])>> - <</if>> - <</for>> - <<if $eventSlaves.length > 0>> - <<set $activeSlave = $eventSlaves.random()>> + <<set _eventSlaves = $slaves.filter(function(s) { return s.assignment == "serve in the club" && canWalk(s); })>> + <<if _eventSlaves.length > 0>> + <<set $activeSlave = _eventSlaves.random()>> <<if random(1,2) == 1>> This includes a sex toy based on $activeSlave.slaveName's <<if (random(1,3) == 1) && ($activeSlave.vaginalSkill >= 100)>> @@ -41,14 +36,9 @@ <<else>> A corner of your desk is piled with sample merchandise from the campaign promoting $brothelName. <</if>> - <<set $eventSlaves = []>> - <<for _odi = 0; _odi < $slaves.length; _odi++>> - <<if ($slaves[_odi].assignment == "work in the brothel") && canWalk($slaves[_odi])>> - <<set $eventSlaves.push($slaves[_odi])>> - <</if>> - <</for>> - <<if $eventSlaves.length > 0>> - <<set $activeSlave = $eventSlaves.random()>> + <<set _eventSlaves = $slaves.filter(function(s) { return s.assignment == "work in the brothel" && canWalk(s); })>> + <<if _eventSlaves.length > 0>> + <<set $activeSlave = _eventSlaves.random()>> <<if random(1,2) == 1>> This includes a sex toy based on $activeSlave.slaveName's <<if (random(1,3) == 1) && ($activeSlave.vaginalSkill >= 100)>>