Skip to content
Snippets Groups Projects
Commit b1802463 authored by lowercasedonkey's avatar lowercasedonkey
Browse files

remove slaves length const

parent 0c3068cf
No related branches found
No related tags found
1 merge request!8268Cellblock to js
......@@ -6,7 +6,6 @@ App.EndWeek.cellblockReport = function() {
let r;
const slaves = App.Utils.sortedEmployees(App.Entity.facilities.cellblock);
const slavesLength = slaves.length;
let brokenSlaves = 0, idleBonus = 0, softenedQuirks = 0, trustMalus = 0, FLsFetish = 0, devBonus;
if (V.cellblockDecoration !== "standard") {
......@@ -155,18 +154,18 @@ App.EndWeek.cellblockReport = function() {
}
App.Events.addNode(el, r, "div", "indent");
}
if (slavesLength < V.cellblock && !slaveResting(S.Wardeness)) {
const seed = random(1, 10) + ((V.cellblock - slavesLength) * (random(150, 170) + (idleBonus * 10)));
if (slaves.length < V.cellblock && !slaveResting(S.Wardeness)) {
const seed = random(1, 10) + ((V.cellblock - slaves.length) * (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 (slavesLength > 0) {
if (slavesLength === 1) {
if (slaves.length > 0) {
if (slaves.length === 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, `${slavesLength} slaves are being confined in ${V.cellblockName} until they are willing to obey.`, "indent");
App.UI.DOM.appendNewElement("div", el, `${slaves.length} slaves are being confined in ${V.cellblockName} until they are willing to obey.`, "indent");
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment