From 3bedacb20a90fa45a8835e28e226fa8e8bd306cd Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Thu, 23 Jan 2020 14:22:17 -0500 Subject: [PATCH] add additional reports --- src/endWeek/saStayConfined.js | 25 ++++++++++++++++++++++--- src/uncategorized/clinicReport.tw | 2 +- src/uncategorized/schoolroomReport.tw | 2 +- src/uncategorized/spaReport.tw | 2 +- 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/endWeek/saStayConfined.js b/src/endWeek/saStayConfined.js index 7b60f4536c8..104dc99e52f 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 += ` so <span class="noteworthy">`; + + if (V.assignmentRecords[slave.ID]) { + let oldJob = V.assignmentRecords[slave.ID]; + assignJobSafely(slave, oldJob); + if (slave.assignment === "rest") { + if (oldJob !== "rest") { + t += ` since ${he} was unable to return to ${his} old task to ${oldJob}, ${his} assignment has defaulted to rest.`; + } else { + t += ` ${he} has returned to rest.`; + } + } else { + t += ` ${he} goes back to ${oldJob}.`; + } + } else { + t += ` ${his} assignment has defaulted to rest.`; + removeJob(slave, slave.assignment); + } + + t += `</span>`; + if (slave.assignment === "be confined in the cellblock") { State.temporary.brokenSlaves++; State.temporary.DL--; State.temporary.dI--; } - removeJob(slave, slave.assignment); } - return t; }; diff --git a/src/uncategorized/clinicReport.tw b/src/uncategorized/clinicReport.tw index 4f5beac54c5..264c9156964 100644 --- a/src/uncategorized/clinicReport.tw +++ b/src/uncategorized/clinicReport.tw @@ -300,7 +300,7 @@ <<else>> <p> <span class="slave-name">$slaves[$i].slaveName</span> has been cured<<if ($Nurse != 0) && ($clinicUpgradeFilters == 1)>> and purified<</if>>, so - <span class="yellow"> + <span class="noteworthy"> <<if $assignmentRecords[$slaves[$i].ID]>> <<set _oldJob = $assignmentRecords[$slaves[$i].ID]>> <<= assignJobSafely($slaves[$i], _oldJob)>> diff --git a/src/uncategorized/schoolroomReport.tw b/src/uncategorized/schoolroomReport.tw index 085dd4552ea..ce52b02893d 100644 --- a/src/uncategorized/schoolroomReport.tw +++ b/src/uncategorized/schoolroomReport.tw @@ -175,7 +175,7 @@ <<if ($slaves[$i].skill.vaginal > 30) || (($schoolroomUpgradeSkills == 0) && ($slaves[$i].skill.vaginal > 10)) || ($slaves[$i].vagina < 0)>> <p> <span class="slave-name">$slaves[$i].slaveName</span> can learn little from further classes, so - <span class="yellow"> + <span class="noteworthy"> <<if $assignmentRecords[$slaves[$i].ID]>> <<set _oldJob = $assignmentRecords[$slaves[$i].ID]>> <<= assignJobSafely($slaves[$i], _oldJob)>> diff --git a/src/uncategorized/spaReport.tw b/src/uncategorized/spaReport.tw index 751cc7d5360..989461e3264 100644 --- a/src/uncategorized/spaReport.tw +++ b/src/uncategorized/spaReport.tw @@ -290,7 +290,7 @@ <<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")>> <p> <span class="slave-name">$slaves[$i].slaveName</span>is feeling well enough to leave $spaName, so - <span class="yellow"> + <span class="noteworthy"> <<if $assignmentRecords[$slaves[$i].ID]>> <<set _oldJob = $assignmentRecords[$slaves[$i].ID]>> <<= assignJobSafely($slaves[$i], _oldJob)>> -- GitLab