diff --git a/src/endWeek/reports/cellblockReport.js b/src/endWeek/reports/cellblockReport.js index 4d6d974973d9445e3c01d6f9912345bc7881c670..6c71f5f73e90986d12fe75dece2b03d1a7888aef 100644 --- a/src/endWeek/reports/cellblockReport.js +++ b/src/endWeek/reports/cellblockReport.js @@ -6,7 +6,7 @@ App.EndWeek.cellblockReport = function() { let r; const slaves = App.Utils.sortedEmployees(App.Entity.facilities.cellblock); - const DL = slaves.length; + const slavesLength = slaves.length; let brokenSlaves = 0, idleBonus = 0, softenedQuirks = 0, trustMalus = 0, FLsFetish = 0, devBonus; if (V.cellblockDecoration !== "standard") { @@ -156,18 +156,18 @@ App.EndWeek.cellblockReport = function() { } App.Events.addNode(el, r, "div", "indent"); } - if (DL < V.cellblock && !slaveResting(S.Wardeness)) { - const seed = random(1, 10) + ((V.cellblock - DL) * (random(150, 170) + (idleBonus * 10))); + if (slavesLength < V.cellblock && !slaveResting(S.Wardeness)) { + const seed = random(1, 10) + ((V.cellblock - slavesLength) * (random(150, 170) + (idleBonus * 10))); cashX(seed, "cellblock", S.Wardeness); App.Events.addNode(el, [`Since ${he} doesn't have enough prisoners to manage to keep ${him} busy, ${he} works on citizens' slaves, earning <span class="yellowgreen"> ${cashFormat(seed)}.</span>`], "div", "indent"); } } - if (DL > 0) { - if (DL === 1) { + if (slavesLength > 0) { + if (slavesLength === 1) { App.UI.DOM.appendNewElement("div", el, `One slave is being confined in ${V.cellblockName} until they are willing to obey.`, "indent"); } else { - App.UI.DOM.appendNewElement("div", el, `${DL} slaves are being confined in ${V.cellblockName} until they are willing to obey.`, "indent"); + App.UI.DOM.appendNewElement("div", el, `${slavesLength} slaves are being confined in ${V.cellblockName} until they are willing to obey.`, "indent"); } }