diff --git a/src/endWeek/saStayConfined.js b/src/endWeek/saStayConfined.js index 7b60f4536c80a36f1132a3557171399e87405e69..4a1453a591b9686a6f583f12c26a14d328b23632 100644 --- a/src/endWeek/saStayConfined.js +++ b/src/endWeek/saStayConfined.js @@ -99,14 +99,33 @@ window.saStayConfined = function saStayConfined(slave) { } else { t += ` ${He} is now willing to <span class="devotion accept">do as ${he}'s told,</span>`; } - t += ` so <span class="noteworthy">${his} assignment has defaulted to rest.</span>`; + + t += ` <span class="noteworthy">`; if (slave.assignment === "be confined in the cellblock") { State.temporary.brokenSlaves++; State.temporary.DL--; State.temporary.dI--; } - removeJob(slave, slave.assignment); - } + if (V.assignmentRecords[slave.ID]) { + let oldJob = V.assignmentRecords[slave.ID]; + assignJobSafely(slave, oldJob); + if (slave.choosesOwnAssignment === 1) { + t += ` and ${he} is resting before choosing another task.`; + } else if (slave.assignment === "rest") { + if (oldJob !== "rest") { + t += ` and since ${he} was unable to return to ${his} old task to ${oldJob}, ${his} assignment has defaulted to rest.`; + } else { + t += ` so ${he} has returned to rest.`; + } + } else { + t += ` so ${he} goes back to ${oldJob}.`; + } + } else { + t += ` so ${his} assignment has defaulted to rest.`; + removeJob(slave, slave.assignment); + } + t += `</span>`; + } return t; }; diff --git a/src/endWeek/saTakeClasses.js b/src/endWeek/saTakeClasses.js index 08ee9f45019a39fabfe92ce95ef0f3d89c317afc..e18ffc65c03be80af31eb7d3ec9b7348df266495 100644 --- a/src/endWeek/saTakeClasses.js +++ b/src/endWeek/saTakeClasses.js @@ -412,8 +412,26 @@ window.saTakeClasses = (function saServeThePublic() { if ((slave.skill.entertainment > 30) || (V.schoolroomUpgradeSkills === 0 && slave.skill.entertainment > 10)) { if ((slave.skill.anal > 30) || (V.schoolroomUpgradeSkills === 0 && slave.skill.anal > 10)) { if ((slave.skill.vaginal > 30) || (V.schoolroomUpgradeSkills === 0 && slave.skill.vaginal > 10) || (slave.vagina < 0)) { - r += ` ${He} can learn little from further classes, so <span class="noteworthy">${his} assignment has defaulted to rest.</span>`; - removeJob(slave, "take classes"); + r += ` <span class="noteworthy">`; + if (V.assignmentRecords[slave.ID]) { + let oldJob = V.assignmentRecords[slave.ID]; + assignJobSafely(slave, oldJob); + if (slave.choosesOwnAssignment === 1) { + t += ` and ${he} is resting before choosing another task.`; + } else if (slave.assignment === "rest") { + if (oldJob !== "rest") { + r += ` and since ${he} was unable to return to ${his} old task to ${oldJob}, ${his} assignment has defaulted to rest.`; + } else { + r += ` so ${he} has returned to rest.`; + } + } else { + r += ` so ${he} goes back to ${oldJob}.`; + } + } else { + r += ` so ${his} assignment has defaulted to rest.`; + removeJob(slave, slave.assignment); + } + r += `</span>`; } } } diff --git a/src/gui/css/mainStyleSheet.css b/src/gui/css/mainStyleSheet.css index 2c20405dee171c3676da7590fceb662832d89f77..77595075c001e7ebf299ffd23d0ff0040780e246 100644 --- a/src/gui/css/mainStyleSheet.css +++ b/src/gui/css/mainStyleSheet.css @@ -326,3 +326,10 @@ div.double-indent { .story-label { text-decoration: underline; } + +/* Note: Do not do a linebreak after span in HTML, because it will underline the automatic space it inserts: "Matilda_is a cow" */ +.slave-name { + color: pink; + font-weight: bold; + text-decoration: underline; +} \ No newline at end of file diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index c872cf579b8ebb1b5d33b9725e87e1676e355372..a57b06613734f65bdc1a1302948a5d288a066277 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -336,6 +336,7 @@ You should have received a copy of the GNU General Public License along with thi <<set $useSlaveSummaryOverviewTab = 0>> <<set $useSlaveListInPageJSNavigation = 0>> <<set $killChoice = -1>> + <<set $assignmentRecords = {}>> /* master suite reporting and alternate descriptions */ <<set $verboseDescriptions = 0>> diff --git a/src/js/assignJS.js b/src/js/assignJS.js index 0002a19f9885bee7d085d8320d7770d3079f6fad..7caead6c7c1343aef7236df1ff8ccf54a49b5304 100644 --- a/src/js/assignJS.js +++ b/src/js/assignJS.js @@ -2,6 +2,7 @@ window.assignJob = function assignJob(slave, job) { "use strict"; let r = ""; + let oldJob = slave.assignment; if (job === "Pit" || job === "Coursing Association") { return r; } @@ -16,6 +17,24 @@ window.assignJob = function assignJob(slave, job) { V[propName] = slave; }; + /* Tracking for the following cases: */ + if (V.assignmentRecords[slave.ID] !== "choose her own job") { // if choosesOwnAssignment was set before removeJob (which wipes it out), it's saved in assignmentRecords. We don't want to overwrite that here, as we want to be able to get it back. + switch (job.toLowerCase()) { + case "be confined in the cellblock": + case "cellblock": + case "get treatment in the clinic": + case "clinic": + case "learn in the schoolroom": + case "schoolroom": + case "rest in the spa": + case "spa": + if (oldJob !== "rest") { + V.assignmentRecords[slave.ID] = oldJob; // these jobs are temporary, so we save what the slave will return to if it is meaningful. + } + break; + } + } + /* use .toLowerCase() to get rid of a few dupe conditions. */ switch (job.toLowerCase()) { case "be confined in the arcade": @@ -385,6 +404,17 @@ window.assignJob = function assignJob(slave, job) { return r; }; +window.assignJobSafely = function assignJobSafely(slave, assignmentStr){ + if (V.assignmentRecords[slave.ID] === "choose her own job") { + assignJob(slave, "rest"); + slave.choosesOwnAssignment = 1; + } else if (!App.Utils.jobForAssignment(assignmentStr).canEmploy(slave).length) { // If nothing complains about job requirements not being met + assignJob(slave, assignmentStr); + } else { + assignJob(slave, "rest"); + } +}; + window.removeJob = function removeJob(slave, assignment) { "use strict"; let r = ""; @@ -396,6 +426,10 @@ window.removeJob = function removeJob(slave, assignment) { return r; } + if (V.assignmentRecords[slave.ID]) { + delete V.assignmentRecords[slave.ID]; + } + const idx = V.slaveIndices[slave.ID]; if (assignment === "Pit") { @@ -583,6 +617,10 @@ window.removeJob = function removeJob(slave, assignment) { slave.rules.living = "normal"; } + if (slave.choosesOwnAssignment > 0) { + V.assignmentRecords[slave.ID] = "choose her own job"; + } + slave.choosesOwnAssignment = 0; slave.sentence = 0; } @@ -808,7 +846,7 @@ App.UI.SlaveInteract = { const slave = State.variables.activeSlave; const {his} = getPronouns(slave); if ((slave.assignment === "please you") || (slave.assignment === "serve in the master suite") || (slave.assignment === "be your Concubine")) { - res += `<span class="story-label">Fucktoy use preference</span>: <strong><span id = "hole">${slave.toyHole}</span></strong>.`; + res += `<span class="story-label">Fucktoy use preference:</span> <strong><span id = "hole">${slave.toyHole}</span></strong>.`; /** @type {string[]} */ let links = []; links.push('<<link "Mouth">><<set $activeSlave.toyHole = "mouth">><<replace "#hole">>$activeSlave.toyHole<</replace>><</link>>'); @@ -900,8 +938,11 @@ App.Utils.jobForAssignment = function() { if (map.size === 0) { fillMap(); } - return map.get(assignment); + const res = map.get(assignment); + if (!res) { + throw Error(`Can't find job object for assignment '${assignment}'`); + } + return res; } - return getJob; }(); diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 65ffa9c4653a7c55fe2d7c6d9ba8d048b4ef2a86..dc6376c4614b2a772baa9c3554beaa583f850db3 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -2131,3 +2131,33 @@ window.agentBonus = function(arcology) { } return bonus; }; + +/** + * Charge for subsidies and supply barriers and report the results + * @param {string} NPCclass One of "lower", "middle", "upper", or "top" + * @returns {string} + */ +window.chargeSupplyPolicies = function(NPCclass) { + let r = ``; + const varName = `${NPCclass}Class`; + + // charge supply barriers (unreported, since it's a flat amount that you were told when you enacted the policy) + const supplyCosts = [0, 1000, 5000, 20000, 60000]; + cashX(forceNeg(supplyCosts[V.sexSupplyBarriers[varName]])); + + // report subsidy cost since it is variable + if (V.sexSubsidies[varName] > 0) { + const severity = ["none", "minor", "moderate", "substantial", "gratuitous"]; + const subsidyCost = forceNeg(Math.trunc(V.NPCSexSupply[varName] * Math.pow(V.sexSubsidies[varName], 2) * 0.25)); + r += `Your ${severity[V.sexSubsidies[varName]]} subsidies of ${NPCclass} class sex supply cost you ${cashFormatColor(subsidyCost)} this week. `; + cashX(subsidyCost, "policies"); + + // warn about conflicting policies + if (V.sexSupplyBarriers[varName > 0]) { + r += `The supply barriers you are imposing on ${NPCclass} class sex supply <span class="red">reduce the effectiveness</span> of your subsidies and <span class="red">increase your costs.</span>`; + } + r += `<br>`; + } + + return r; +}; diff --git a/src/js/physicalDevelopment.js b/src/js/physicalDevelopment.js index 5187babb464e19cade390763f28f652b4d56ca19..e29d8a82ea2ee56d9750e0c78a7aa296a3a113b5 100644 --- a/src/js/physicalDevelopment.js +++ b/src/js/physicalDevelopment.js @@ -32,7 +32,7 @@ window.physicalDevelopment = (function physicalDevelopment() { if (slave.balls > 0 && slave.balls < 3) { increaseBalls(slave); } - if (slave.vagina > 0 && slave.ovaries > 0 && slave.pubertyXX > 0) { + if (slave.vagina > 0 && slave.ovaries > 0 && slave.physicalAge > slave.pubertyAgeXX) { increaseWetness(slave); } if (slave.waist < 10) { @@ -63,7 +63,7 @@ window.physicalDevelopment = (function physicalDevelopment() { if (slave.clit > 0) { increaseClit(slave); } - if (slave.vagina > 0 && slave.ovaries > 0 && slave.pubertyXX > 0) { + if (slave.vagina > 0 && slave.ovaries > 0 && slave.physicalAge > slave.pubertyAgeXX) { increaseWetness(slave); } increaseWaistXX(slave); diff --git a/src/js/removeActiveSlave.js b/src/js/removeActiveSlave.js index e5ce66906de23fbd59c4ede720ea20765618796d..1d34fc8386a3e90b0a268d4a4afa3212ee80fa94 100644 --- a/src/js/removeActiveSlave.js +++ b/src/js/removeActiveSlave.js @@ -229,6 +229,10 @@ window.removeActiveSlave = function removeActiveSlave() { V.missingParentID--; } + if (V.assignmentRecords[AS_ID]) { + delete V.assignmentRecords[AS_ID]; + } + removeSlave(INDEX); LENGTH--; V.activeSlave = 0; diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index bb4142d9c589b891551ca7ddba053cbebe93ccbb..9491ea05451cb9454e056bdf09babd02678f5634 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -3150,7 +3150,9 @@ Setting missing slave variables: <<run App.Entity.Utils.SlaveDataSchemeCleanup($traitor)>> <<run SlaveDatatypeCleanup($traitor)>> <</if>> - +<<if ndef $assignmentRecords>> + <<set $assignmentRecords = {}>> +<</if>> Done<br> diff --git a/src/uncategorized/arcmgmt.tw b/src/uncategorized/arcmgmt.tw index 99a9c2c32150ae3b460a263cf198014a93c98328..ecf5094653c623ae72050c0b6f944341f9849c58 100644 --- a/src/uncategorized/arcmgmt.tw +++ b/src/uncategorized/arcmgmt.tw @@ -53,18 +53,7 @@ <</if>> Lower class satisfaction is at <<print $sexDemandResult.lowerClass/10>>%<<if _overSupply.lowerClass > 0>> and the arcology provides <<print _overSupply.lowerClass/10>>% more sexual services than required which @@.red;drives prices down@@<</if>>, <<print $NPCMarketShare.lowerClass/10>>% of the market is serviced by other suppliers operating inside your arcology.<br> -<<if $sexSupplyBarriers.lowerClass == 1>> - <<run cashX(1000, "policies")>> -<<elseif $sexSupplyBarriers.lowerClass == 2>> - <<run cashX(5000, "policies")>> -<<elseif $sexSupplyBarriers.lowerClass == 3>> - <<run cashX(20000, "policies")>> -<<elseif $sexSupplyBarriers.lowerClass == 4>> - <<run cashX(60000, "policies")>> -<</if>> -<<if $sexSubsidiesLC > 0>> - <<run cashX($NPCSlaves.lowerClass * Math.pow($sexSubsidies.lowerClass, 2) * 0.25, "policies")>> -<</if>> +<<= chargeSupplyPolicies("lower") >> <<if $sexDemandResult.middleClass < 350>> Your middle class citizens have @@.red;far too few options for sexual relief@@ inside your arcology. @@ -100,18 +89,7 @@ Lower class satisfaction is at <<print $sexDemandResult.lowerClass/10>>%<<if _ov <</if>> Middle class satisfaction is at <<print $sexDemandResult.middleClass/10>>%<<if _overSupply.middleClass > 0>> and the arcology provides <<print _overSupply.middleClass/10>>% more sexual services than required which @@.red;drives prices down@@<</if>>, <<print $NPCMarketShare.middleClass/10>>% of the market is serviced by other suppliers operating inside your arcology.<br> -<<if $sexSupplyBarriers.middleClass == 1>> - <<run cashX(1000, "policies")>> -<<elseif $sexSupplyBarriers.middleClass == 2>> - <<run cashX(5000, "policies")>> -<<elseif $sexSupplyBarriers.middleClass == 3>> - <<run cashX(20000, "policies")>> -<<elseif $sexSupplyBarriers.middleClass == 4>> - <<run cashX(60000, "policies")>> -<</if>> -<<if $sexSubsidiesLC > 0>> - <<run cashX($NPCSlaves.middleClass * Math.pow($sexSubsidies.middleClass, 2) * 0.25, "policies")>> -<</if>> +<<= chargeSupplyPolicies("middle") >> <<if $sexDemandResult.upperClass < 350>> Your upper class citizens have @@.red;far too few options for sexual relief@@ inside your arcology. @@ -147,18 +125,7 @@ Middle class satisfaction is at <<print $sexDemandResult.middleClass/10>>%<<if _ <</if>> Upper class satisfaction is at <<print $sexDemandResult.upperClass/10>>%<<if _overSupply.upperClass > 0>> and the arcology provides <<print _overSupply.upperClass/10>>% more sexual services than required which @@.red;drives prices down@@<</if>>, <<print $NPCMarketShare.upperClass/10>>% of the market is serviced by other suppliers operating inside your arcology.<br> -<<if $sexSupplyBarriers.upperClass == 1>> - <<run cashX(1000, "policies")>> -<<elseif $sexSupplyBarriers.upperClass == 2>> - <<run cashX(5000, "policies")>> -<<elseif $sexSupplyBarriers.upperClass == 3>> - <<run cashX(20000, "policies")>> -<<elseif $sexSupplyBarriers.upperClass == 4>> - <<run cashX(60000, "policies")>> -<</if>> -<<if $sexSubsidiesLC > 0>> - <<run cashX($NPCSlaves.upperClass * Math.pow($sexSubsidies.upperClass, 2) * 0.25, "policies")>> -<</if>> +<<= chargeSupplyPolicies("upper") >> <<if $sexDemandResult.topClass < 350>> Your arcology's millionaires have @@.red;far too few options for sexual relief@@ inside your arcology. @@ -194,18 +161,7 @@ Upper class satisfaction is at <<print $sexDemandResult.upperClass/10>>%<<if _ov <</if>> Millionaire satisfaction is at <<print $sexDemandResult.topClass/10>>%<<if _overSupply.topClass > 0>> and the arcology provides <<print _overSupply.topClass/10>>% more sexual services than required which @@.red;drives prices down@@<</if>>, <<print $NPCMarketShare.topClass/10>>% of the market is serviced by other suppliers operating inside your arcology.<br> -<<if $sexSupplyBarriers.topClass == 1>> - <<run cashX(1000, "policies")>> -<<elseif $sexSupplyBarriers.topClass == 2>> - <<run cashX(5000, "policies")>> -<<elseif $sexSupplyBarriers.topClass == 3>> - <<run cashX(20000, "policies")>> -<<elseif $sexSupplyBarriers.topClass == 4>> - <<run cashX(60000, "policies")>> -<</if>> -<<if $sexSubsidiesLC > 0>> - <<run cashX($NPCSlaves.topClass * Math.pow($sexSubsidies.topClass, 2) * 0.25, "policies")>> -<</if>> +<<= chargeSupplyPolicies("top") >> <br> diff --git a/src/uncategorized/clinicReport.tw b/src/uncategorized/clinicReport.tw index 788401e4d5587a4d846d65c495b83f426b509350..0f051540f9fc5be93292bdd80d75b8fce0faceb4 100644 --- a/src/uncategorized/clinicReport.tw +++ b/src/uncategorized/clinicReport.tw @@ -292,15 +292,36 @@ <</if>> <</if>> <<if ($slaves[$i].health.illness > 0)>> - <<elseif ($slave[$i].health.shortDamage >= 10)>> + <<elseif ($slaves[$i].health.shortDamage >= 10)>> <<elseif ($slaves[$i].health.condition <= 40)>> <<elseif ($Nurse != 0) && ($slaves[$i].chem > 15) && ($clinicUpgradeFilters == 1)>> <<elseif ($Nurse != 0) && ($slaves[$i].pregKnown == 1) && ($clinicSpeedGestation > 0 || $slaves[$i].pregControl == "speed up")>> <<elseif ($Nurse != 0) && ($slaves[$i].pregAdaptation*1000 < $slaves[$i].bellyPreg || $slaves[$i].preg > $slaves[$i].pregData.normalBirth/1.33)>> <<elseif ($Nurse != 0) && ($clinicInflateBelly > 0) && ($slaves[$i].bellyImplant >= 0) && ($slaves[$i].bellyImplant <= ($arcologies[0].FSTransformationFetishistResearch ? 800000 : 130000))>> <<else>> - <br><br>''__@@.pink;$slaves[$i].slaveName@@__'' has been cured<<if ($Nurse != 0) && ($clinicUpgradeFilters == 1)>> and purified<</if>>, so @@.yellow;$his assignment has defaulted to rest.@@ - <<= removeJob($slaves[$i], "get treatment in the clinic")>> + <p> + <span class="slave-name">$slaves[$i].slaveName</span> has been cured<<if ($Nurse != 0) && ($clinicUpgradeFilters == 1)>> and purified<</if>>, + <span class="noteworthy"> + <<if $assignmentRecords[$slaves[$i].ID]>> + <<set _oldJob = $assignmentRecords[$slaves[$i].ID]>> + <<= assignJobSafely($slaves[$i], _oldJob)>> + <<if $slaves[$i].choosesOwnAssignment === 1>> + and $he is resting before choosing another task. + <<elseif $slaves[$i].assignment === "rest">> + <<if _oldJob != "rest">> + and since $he was unable to return to $his old task to <<print _oldJob>>, $his assignment has defaulted to rest. + <<else>> + so $he has returned to rest. + <</if>> + <<else>> + so $he goes back to <<print $slaves[$i].assignment>>. + <</if>> + <<else>> + so $his assignment has defaulted to rest. + <<= removeJob($slaves[$i], "get treatment in the clinic")>> + <</if>> + </span> + </p> <<set _restedSlaves++, _dI--, _DL-->> <<continue>> <</if>> diff --git a/src/uncategorized/persBusiness.tw b/src/uncategorized/persBusiness.tw index 5b130b952a51976988e761f63dc08b12f7f1d9cf..fe6e161bf3c2c6ca6404927c564c629850803903 100644 --- a/src/uncategorized/persBusiness.tw +++ b/src/uncategorized/persBusiness.tw @@ -628,7 +628,7 @@ <</if>> <</if>> - <<case "technical accidents">> /* needs work */ + <<case "technical accidents">> <<set _windfall = Math.trunc((150*$PC.skill.hacking)+random(100,2500)), _X = 0>> <<if $PC.skill.hacking == -100>> <<set _Catchtchance = 10>> diff --git a/src/uncategorized/saChoosesOwnJob.tw b/src/uncategorized/saChoosesOwnJob.tw index f69d8ea9cf35d4aa69a19df2ea11f3c24fac4784..849db7560e048932466aca30a3e96dff243501a9 100644 --- a/src/uncategorized/saChoosesOwnJob.tw +++ b/src/uncategorized/saChoosesOwnJob.tw @@ -2,6 +2,8 @@ <<set _clinicL = $CliniciIDs.length, _schoolL = $SchlRiIDs.length, _servQL = $ServQiIDs.length, _nurseryL = $NurseryiIDs.length, _brothelL = $BrothiIDs.length, _clubL = $ClubiIDs.length, _masterSL = $MastSiIDs.length, _spaL = $SpaiIDs.length, _dairyL = $DairyiIDs.length>> +<<setLocalPronouns $slaves[$i]>> + <<if ($slaves[$i].choosesOwnAssignment == 0) || ($slaves[$i].fuckdoll > 0) || ($slaves[$i].fetish == "mindbroken")>> /* nothing to do */ diff --git a/src/uncategorized/schoolroomReport.tw b/src/uncategorized/schoolroomReport.tw index b939302ffebde08527c2dc09a1394c83e7e6a1f9..252b5d1c427087443b638988a6bda9304da3519e 100644 --- a/src/uncategorized/schoolroomReport.tw +++ b/src/uncategorized/schoolroomReport.tw @@ -162,7 +162,11 @@ <</if>> /% Education done? Has to be here before we run the SA's or there will be double entries for slave %/ <<if $slaves[$i].fetish == "mindbroken">> - <<= removeJob($slaves[$i], "learn in the schoolroom")>> + <<if $assignmentRecords[$slaves[$i].ID]>> + <<= assignJobSafely($slaves[$i], $assignmentRecords[$slaves[$i].ID])>> + <<else>> + <<= removeJob($slaves[$i], "learn in the schoolroom")>> + <</if>> <<set _restedSlaves++, _dI--, _DL-->> <<continue>> <<else>> @@ -173,8 +177,29 @@ <<if ($slaves[$i].skill.entertainment > 30) || (($schoolroomUpgradeSkills == 0) && ($slaves[$i].skill.entertainment > 10))>> <<if ($slaves[$i].skill.anal > 30) || (($schoolroomUpgradeSkills == 0) && ($slaves[$i].skill.anal > 10))>> <<if ($slaves[$i].skill.vaginal > 30) || (($schoolroomUpgradeSkills == 0) && ($slaves[$i].skill.vaginal > 10)) || ($slaves[$i].vagina < 0)>> - <br><br>''__@@.pink;$slaves[$i].slaveName@@__'' can learn little from further classes, so @@.yellow;_his2 assignment has defaulted to rest.@@ - <<= removeJob($slaves[$i], "learn in the schoolroom")>> + <p> + <span class="slave-name">$slaves[$i].slaveName</span> can learn little from further classes, + <span class="noteworthy"> + <<if $assignmentRecords[$slaves[$i].ID]>> + <<set _oldJob = $assignmentRecords[$slaves[$i].ID]>> + <<= assignJobSafely($slaves[$i], _oldJob)>> + <<if $slaves[$i].choosesOwnAssignment === 1>> + and $he is resting before choosing another task. + <<elseif $slaves[$i].assignment === "rest">> + <<if _oldJob != "rest">> + and since $he was unable to return to $his old task to <<print _oldJob>>, $his assignment has defaulted to rest. + <<else>> + so $he has returned to rest. + <</if>> + <<else>> + so $he goes back to <<print $slaves[$i].assignment>>. + <</if>> + <<else>> + so _his2 assignment has defaulted to rest. + <<= removeJob($slaves[$i], "learn in the schoolroom")>> + <</if>> + </span> + </p> <<set _restedSlaves++, _dI--, _DL-->> <<continue>> <</if>> diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw index 076fc739f09927e53467dac6c3d95a51bb77f2a9..46253cc557bc1b8db6fbdbeab9ffc4da6a207e79 100644 --- a/src/uncategorized/slaveInteract.tw +++ b/src/uncategorized/slaveInteract.tw @@ -506,7 +506,17 @@ /* CAN BE REASSIGNED */ - Assignment: <strong><span id="assign">$activeSlave.assignment<<if $activeSlave.sentence>> ($activeSlave.sentence weeks)<</if>></span>.</strong> + Assignment: + <span id="assign" font-weight="bold"> + <<if $activeSlave.sentence>> + $activeSlave.assignment ($activeSlave.sentence weeks). + <<else>> + $activeSlave.assignment. + <</if>> + </span> + <<if $assignmentRecords[$activeSlave.ID] && $assignmentRecords[$activeSlave.ID] != $activeSlave.assignment>> + Previously: <<print $assignmentRecords[$activeSlave.ID]>> + <</if>> <span id="assignmentLinks"><<= App.UI.SlaveInteract.assignmentBlock("assignmentLinks")>></span> <<set _numFacilities = $brothel+$club+$dairy+$farmyard+$servantsQuarters+$masterSuite+$spa+$nursery+$clinic+$schoolroom+$cellblock+$arcade+$HGSuite>> diff --git a/src/uncategorized/spaReport.tw b/src/uncategorized/spaReport.tw index 28d77963b349707c5dd73595fbd817e9e96133cf..40326adbf1d99702c29b91fa16b674eb377f3e2c 100644 --- a/src/uncategorized/spaReport.tw +++ b/src/uncategorized/spaReport.tw @@ -288,8 +288,29 @@ <<set $slaves[$i].rules.living = "luxurious">> <</switch>> <<if ($slaves[$i].health.condition >= 50) && ($slaves[$i].health.tired < 20) && ($slaves[$i].trust > 60) && ($slaves[$i].devotion > 60) && ($slaves[$i].fetish != "mindbroken") && ($slaves[$i].sexualFlaw == "none") && ($slaves[$i].behavioralFlaw == "none")>> - <br><br>''__@@.pink;$slaves[$i].slaveName@@__'' is feeling well enough to leave $spaName, so @@.yellow;$his assignment has defaulted to rest.@@ - <<= removeJob($slaves[$i], "rest in the spa")>> + <p> + <span class="slave-name">$slaves[$i].slaveName</span> is feeling well enough to leave $spaName, + <span class="noteworthy"> + <<if $assignmentRecords[$slaves[$i].ID]>> + <<set _oldJob = $assignmentRecords[$slaves[$i].ID]>> + <<= assignJobSafely($slaves[$i], _oldJob)>> + <<if $slaves[$i].choosesOwnAssignment === 1>> + and $he is resting before choosing another task. + <<elseif $slaves[$i].assignment === "rest">> + <<if _oldJob != "rest">> + and since $he was unable to return to $his old task to <<print _oldJob>>, $his assignment has defaulted to rest. + <<else>> + so $he has returned to rest. + <</if>> + <<else>> + so $he goes back to <<print $slaves[$i].assignment>>. + <</if>> + <<else>> + so $his assignment has defaulted to rest. + <<= removeJob($slaves[$i], "rest in the spa")>> + <</if>> + </span> + </p> <<set _restedSlaves++, _DL--, _dI-->> <<continue>> <</if>>