From f33e3a1c72857a7974dbc6951ad352cc93770b00 Mon Sep 17 00:00:00 2001 From: lowercase-donkey <lowercasedonkey@gmail.com> Date: Tue, 27 Aug 2019 19:39:45 -0400 Subject: [PATCH] school --- src/init/storyInit.tw | 1 - src/js/DefaultRules.js | 2 +- src/js/assignJS.js | 2 -- src/js/playerJS.js | 2 +- src/uncategorized/PETS.tw | 2 +- src/uncategorized/buildingWidgets.tw | 2 +- src/uncategorized/costsBudget.tw | 2 +- src/uncategorized/randomNonindividualEvent.tw | 2 +- src/uncategorized/saChoosesOwnJob.tw | 2 +- src/uncategorized/schoolroom.tw | 14 +++++++------- src/uncategorized/schoolroomReport.tw | 2 +- src/uncategorized/slaveAssignmentsReport.tw | 2 +- src/uncategorized/storyCaption.tw | 4 ++-- 13 files changed, 18 insertions(+), 21 deletions(-) diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index f4f8bcbf001..5e7fecdc487 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -541,7 +541,6 @@ You should have received a copy of the GNU General Public License along with thi <<set $servantsQuarters = 0>> <<set $servantsQuartersName = "the Servants' Quarters">> <<set $servantsQuartersNameCaps = "The Servants' Quarters">> -<<set $schoolroomSlaves = 0>> <<set $schoolroomDecoration = "standard">> <<set $schoolroomUpgradeSkills = 0>> <<set $schoolroomUpgradeLanguage = 0>> diff --git a/src/js/DefaultRules.js b/src/js/DefaultRules.js index 3cdb0a1514d..f132273ed78 100644 --- a/src/js/DefaultRules.js +++ b/src/js/DefaultRules.js @@ -230,7 +230,7 @@ window.DefaultRules = (function() { break; case "learn in the schoolroom": - if ((V.schoolroomSlaves < V.schoolroom && slave.fetish !== "mindbroken" && (slave.devotion >= -20 || slave.trust < -50 || (slave.devotion >= -50 && slave.trust < -20)))) { + if ((V.SchlRiIDs.length < V.schoolroom && slave.fetish !== "mindbroken" && (slave.devotion >= -20 || slave.trust < -50 || (slave.devotion >= -50 && slave.trust < -20)))) { if ((slave.intelligenceImplant < 30) || (slave.voice !== 0 && slave.accent + V.schoolroomUpgradeLanguage > 2) || (slave.skill.oral <= 10 + V.schoolroomUpgradeSkills * 20) || (slave.skill.whoring <= 10 + V.schoolroomUpgradeSkills * 20) || (slave.skill.entertainment <= 10 + V.schoolroomUpgradeSkills * 20) || (slave.skill.anal < 10 + V.schoolroomUpgradeSkills * 20) || ((slave.vagina >= 0) && (slave.skill.vaginal < 10 + V.schoolroomUpgradeSkills * 20))) { break; } else { diff --git a/src/js/assignJS.js b/src/js/assignJS.js index 52199feee1d..22ce39cd842 100644 --- a/src/js/assignJS.js +++ b/src/js/assignJS.js @@ -175,7 +175,6 @@ window.assignJob = function assignJob(slave, job) { case "schoolroom": slave.assignment = "learn in the schoolroom"; slave.assignmentVisible = 0; - V.schoolroomSlaves++; V.SchlRiIDs.push(slave.ID); slave.livingRules = "normal"; break; @@ -440,7 +439,6 @@ window.removeJob = function removeJob(slave, assignment) { case "schoolroom": slave.assignment = "rest"; V.SchlRiIDs.delete(slave.ID); - V.schoolroomSlaves--; break; case "rest in the spa": diff --git a/src/js/playerJS.js b/src/js/playerJS.js index 0f465e7ccb8..8bb37dc6990 100644 --- a/src/js/playerJS.js +++ b/src/js/playerJS.js @@ -484,7 +484,7 @@ window.PCTitle = function PCTitle() { titles.push("Directrix of the Servants"); } } - if (V.schoolroomSlaves >= 10) { + if (V.SchlRiIDs.length >= 10) { if (V.PC.title === 1) { titles.push("Educator of the Slaves"); } else { diff --git a/src/uncategorized/PETS.tw b/src/uncategorized/PETS.tw index 6160c7c107f..d99dbb50ffc 100644 --- a/src/uncategorized/PETS.tw +++ b/src/uncategorized/PETS.tw @@ -296,7 +296,7 @@ You decide to knit up care's raveled sleave with a break in the spa. You have yo s.counter.oral += 1; }; })>> - <<set $oralTotal += $schoolroomSlaves>> + <<set $oralTotal += $SchlRiIDs.length>> <</replace>> <</link>> <br><<link "Take the delinquent student in hand">> diff --git a/src/uncategorized/buildingWidgets.tw b/src/uncategorized/buildingWidgets.tw index b1dc99d3d48..d1d4ce7eb8f 100644 --- a/src/uncategorized/buildingWidgets.tw +++ b/src/uncategorized/buildingWidgets.tw @@ -150,7 +150,7 @@ if(!Macro.has('sectorblock')) { <<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 $readyChildren > 0>>@@.yellow;[!]@@<</if>> <</if>> <<if $clinic>> <<print ClinicUIName()>> ($CliniciIDs.length/$clinic<<if $Nurse>>, L<</if>>)<</if>> - <<if $schoolroom>> <<print SchoolRoomUIName()>> ($schoolroomSlaves/$schoolroom<<if $Schoolteacher>>, L<</if>>)<</if>> + <<if $schoolroom>> <<print SchoolRoomUIName()>> ($SchlRiIDs.length/$schoolroom<<if $Schoolteacher>>, L<</if>>)<</if>> <<if $cellblock>> <<print CellblockUIName()>> ($CellBiIDs.length/$cellblock<<if $Wardeness>>, L<</if>>)<</if>> <<if $incubator>> <<print IncubatorUIName()>> (<<if $incubator-$incubatorSlaves == 0>>No empty tanks<<elseif $incubator-$incubatorSlaves == 1>>1 empty tank<<else>><<print $incubator-$incubatorSlaves>> empty tanks<</if>>) <<if $readySlaves > 0>>@@.yellow;[!]@@<</if>> <</if>> <<if $researchLab.level > 0>>[[Prosthetic Lab]]<</if>> diff --git a/src/uncategorized/costsBudget.tw b/src/uncategorized/costsBudget.tw index 62010c74a4f..18f53d8a2a0 100644 --- a/src/uncategorized/costsBudget.tw +++ b/src/uncategorized/costsBudget.tw @@ -161,7 +161,7 @@ for (var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<print budgetLine("masterSuite", "<<if $masterSuite>>[[Master Suite][$nextButton = \"Back to Budget\", $nextLink = \"Costs Budget\"]]<<else>>Master Suite<</if>> ($MastSiIDs.length slaves)")>> - <<print budgetLine("school", "<<if $schoolroom>>[[$schoolroomNameCaps|Schoolroom][$nextButton = \"Back to Budget\", $nextLink = \"Costs Budget\"]]<<else>>$schoolroomNameCaps<</if>> ($schoolroomSlaves slaves)")>> + <<print budgetLine("school", "<<if $schoolroom>>[[$schoolroomNameCaps|Schoolroom][$nextButton = \"Back to Budget\", $nextLink = \"Costs Budget\"]]<<else>>$schoolroomNameCaps<</if>> ($SchlRiIDs.length slaves)")>> <<print budgetLine("spa", "<<if $spa>>[[$spaNameCaps|Spa][$nextButton = \"Back to Budget\", $nextLink = \"Costs Budget\"]]<<else>>$spaNameCaps<</if>> ($spaSlaves slaves)")>> diff --git a/src/uncategorized/randomNonindividualEvent.tw b/src/uncategorized/randomNonindividualEvent.tw index 7b8d6bfdd0b..f926947cb9a 100644 --- a/src/uncategorized/randomNonindividualEvent.tw +++ b/src/uncategorized/randomNonindividualEvent.tw @@ -491,7 +491,7 @@ <<set $PESSevent.push("DJ publicity")>> <</if>> - <<if ($Schoolteacher != 0) && ($schoolroomSlaves > 0) && ($Schoolteacher.intelligence+$Schoolteacher.intelligenceImplant > 15) && ($Schoolteacher.actualAge >= 35)>> + <<if ($Schoolteacher != 0) && ($SchlRiIDs.length > 0) && ($Schoolteacher.intelligence+$Schoolteacher.intelligenceImplant > 15) && ($Schoolteacher.actualAge >= 35)>> <<set $PETSevent.push("aggressive schoolteacher")>> <</if>> diff --git a/src/uncategorized/saChoosesOwnJob.tw b/src/uncategorized/saChoosesOwnJob.tw index 2a0ce13cf9b..68b724e3e80 100644 --- a/src/uncategorized/saChoosesOwnJob.tw +++ b/src/uncategorized/saChoosesOwnJob.tw @@ -33,7 +33,7 @@ <<= assignJob($slaves[$i], "get milked")>> <<elseif ($slaves[$i].intelligenceImplant < 15)>> - <<if ($universalRulesAssignsSelfFacility == 1) && ($schoolroom > $schoolroomSlaves)>> + <<if ($universalRulesAssignsSelfFacility == 1) && ($schoolroom > $SchlRiIDs.length)>> <<set $slaves[$i].choosesOwnAssignmentText += " is uneducated, so $he sits $himself down in $schoolroomName.">> <<= assignJob($slaves[$i], "learn in the schoolroom")>> <<else>> diff --git a/src/uncategorized/schoolroom.tw b/src/uncategorized/schoolroom.tw index daa85c6167e..27b84cab897 100644 --- a/src/uncategorized/schoolroom.tw +++ b/src/uncategorized/schoolroom.tw @@ -1,6 +1,6 @@ :: Schoolroom [nobr] -<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Schoolroom", $showEncyclopedia = 1, $encyclopedia = "Schoolroom", $schoolroomSlaves = $SchlRiIDs.length>> +<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Schoolroom", $showEncyclopedia = 1, $encyclopedia = "Schoolroom">> <<if $schoolroomName != "the Schoolroom">> <<set $schoolroomNameCaps = $schoolroomName.replace("the ", "The ")>> @@ -67,9 +67,9 @@ $schoolroomNameCaps is well-equipped, with wallscreens to display lessons. These reviewing the often complex subject of how to address citizens other that one's owner. <</switch>> -<<if $schoolroomSlaves > 2>> +<<if $SchlRiIDs.length > 2>> $schoolroomNameCaps is busy with slaves, repeating their lessons out loud to drill the instruction home. A few students are maintaining uncomfortable positions in the corner as punishment for poor work. -<<elseif $schoolroomSlaves > 0>> +<<elseif $SchlRiIDs.length > 0>> $schoolroomNameCaps is sparsely populated, the few students repeating their lessons out loud to drill the instruction home. One slave is maintaining an uncomfortable position in the corner as punishment for poor work. <<elseif $Schoolteacher != 0>> <<setLocalPronouns $Schoolteacher>> @@ -79,14 +79,14 @@ $schoolroomNameCaps is well-equipped, with wallscreens to display lessons. These [[Decommission the schoolroom|Main][$schoolroom = 0, $schoolroomUpgradeSkills = 0, $schoolroomUpgradeLanguage = 0, $schoolroomUpgradeRemedial = 0, $schoolroomDecoration = "standard"]] <</if>> -<<if $schoolroomSlaves > 0>> +<<if $SchlRiIDs.length > 0>> <<if $Schoolteacher != 0>><<set _X = 1>><<else>><<set _X = 0>><</if>> - <<set _NewPop = $schoolroomSlaves+$dormitoryPopulation+_X>> + <<set _NewPop = $SchlRiIDs.length+$dormitoryPopulation+_X>> <<link "Remove all slaves" "Schoolroom">> <<if $Schoolteacher != 0>> <<= assignJob($Schoolteacher, "rest")>> <</if>> - <<for $schoolroomSlaves > 0>> + <<for $SchlRiIDs.length > 0>> <<= assignJob($slaves[$slaveIndices[$SchlRiIDs[0]]], "take classes")>> <</for>> <</link>> @@ -96,7 +96,7 @@ $schoolroomNameCaps is well-equipped, with wallscreens to display lessons. These <</if>> <<set _Tmult0 = Math.trunc($schoolroom*1000*$upgradeMultiplierArcology)>> -<br>$schoolroomNameCaps has room to house $schoolroom slaves while they learn. There <<if $schoolroomSlaves == 1>>is<<else>>are<</if>> currently $schoolroomSlaves slave<<if $schoolroomSlaves != 1>>s<</if>> learning in $schoolroomName. +<br>$schoolroomNameCaps has room to house $schoolroom slaves while they learn. There <<if $SchlRiIDs.length == 1>>is<<else>>are<</if>> currently $SchlRiIDs.length slave<<if $SchlRiIDs.length != 1>>s<</if>> learning in $schoolroomName. [[Expand the schoolroom|Schoolroom][cashX(forceNeg(_Tmult0), "capEx"), $schoolroom += 5, $PC.engineering += .1]] //Costs <<print cashFormat(_Tmult0)>>// <br> diff --git a/src/uncategorized/schoolroomReport.tw b/src/uncategorized/schoolroomReport.tw index f10b10637c4..75db2e70068 100644 --- a/src/uncategorized/schoolroomReport.tw +++ b/src/uncategorized/schoolroomReport.tw @@ -1,7 +1,7 @@ :: Schoolroom Report [nobr] <<SlaveIDSort $SchlRiIDs>> -<<set _DL = $SchlRiIDs.length, $schoolroomSlaves = _DL, _SL = $slaves.length, _idleBonus = 0, _FLsFetish = 0>> +<<set _DL = $SchlRiIDs.length, _SL = $slaves.length, _idleBonus = 0, _FLsFetish = 0>> <<if $schoolroomDecoration != "standard">> <<set _devBonus = 1>> diff --git a/src/uncategorized/slaveAssignmentsReport.tw b/src/uncategorized/slaveAssignmentsReport.tw index 18a6cd4a330..39edd888815 100644 --- a/src/uncategorized/slaveAssignmentsReport.tw +++ b/src/uncategorized/slaveAssignmentsReport.tw @@ -733,7 +733,7 @@ $NPCMarketShareLC = Math.trunc(($NPCSexSupply.lowerClass * 1000) / ($NPCSexSuppl ["Club Report", $clubNameCaps, $club, $ClubiIDs.length, $DJ, "DJ"], ["Dairy Report", $dairyNameCaps, $dairy, $DairyiIDs.length, $Milkmaid, "Milkmaid"], ["Farmyard Report", $farmyardNameCaps, $farmyard, $FarmyardiIDs.length, $Farmer, "Farmer"], - ["Schoolroom Report", $schoolroomNameCaps, $schoolroom, $schoolroomSlaves, $Schoolteacher, "Schoolteacher"], + ["Schoolroom Report", $schoolroomNameCaps, $schoolroom, $SchlRiIDs.length, $Schoolteacher, "Schoolteacher"], ["Spa Report", $spaNameCaps, $spa, $spaSlaves, $Attendant, "Attendant"], ["Nursery Report", $nurseryNameCaps, $nurseryNannies, $nurserySlaves, $Matron, "Matron"], ["Servants' Quarters Report", $servantsQuartersNameCaps, $servantsQuarters, $servantsQuartersSlaves, $Stewardess, "Stewardess"], diff --git a/src/uncategorized/storyCaption.tw b/src/uncategorized/storyCaption.tw index 0d3cd1590db..d0d6f884e31 100644 --- a/src/uncategorized/storyCaption.tw +++ b/src/uncategorized/storyCaption.tw @@ -633,9 +633,9 @@ <<if ($schoolroom)>> <br> <<link "$schoolroomNameCaps""Schoolroom">><</link>> <<if $abbreviateSidebar == 2>> - ($schoolroomSlaves/$schoolroom <<if $schoolroomSlaves != 1>>students<<else>>student<</if>><<if $Schoolteacher>>, schoolteacher<</if>>) + ($SchlRiIDs.length/$schoolroom <<if $SchlRiIDs.length != 1>>students<<else>>student<</if>><<if $Schoolteacher>>, schoolteacher<</if>>) <<else>> - ($schoolroomSlaves/$schoolroom<<if $Schoolteacher>>, L<</if>>) + ($SchlRiIDs.length/$schoolroom<<if $Schoolteacher>>, L<</if>>) <</if>> <</if>> -- GitLab