diff --git a/src/endWeek/reports/clubReport.js b/src/endWeek/reports/clubReport.js index de98b3b10aa2a49b8c96c8edccb3b48456b25b6d..9f43989a3e6505c5a6476491c91ebc4da4903766 100644 --- a/src/endWeek/reports/clubReport.js +++ b/src/endWeek/reports/clubReport.js @@ -4,12 +4,9 @@ App.EndWeek.clubReport = function() { const el = new DocumentFragment(); let r; - let he, him, his, He, His, wife, himself; const slaves = App.Utils.sortedEmployees(App.Entity.facilities.club); - const DL = slaves.length; V.legendaryEntertainerID = 0; - let FLsFetish = 0; V.legendaryWombID = 0; // Statistics gathering; income is rep boosts in numbers, and profit will be rep per cash unit, or cash unit per rep @@ -19,6 +16,7 @@ App.EndWeek.clubReport = function() { el.append(clubStats); if (S.DJ) { + let FLsFetish = 0; r = []; if (S.DJ.health.condition < -80) { improveCondition(S.DJ, 20); @@ -58,16 +56,16 @@ App.EndWeek.clubReport = function() { } /* Make sure we have registered living expenses as for any other slave */ getSlaveStatisticData(S.DJ, V.facility.club); - ({ - he, him, his, He, His, wife - } = getPronouns(S.DJ)); + const { + he, him, his, He, His, wife, himself + } = getPronouns(S.DJ); r.push(`${SlaveFullName(S.DJ)} is performing as the DJ.`); if (S.DJ.relationship === -3 && S.DJ.devotion > 50) { r.push(`${He} tries ${his} best to be your energetic, cheerful ${wife}.`); } if (FLsFetish === 1) { r.push(`${He}'s expected to be the innovative, beautiful DJ spinning beats one minute, and come out of ${his} booth to grind on the floor the next; ${he} enjoys the interplay, and finds greater <span class="lightcoral">pleasure in exhibitionism.</span>`); - } else if ((FLsFetish === 2)) { + } else if (FLsFetish === 2) { r.push(`Every day ${he} gets to enjoy hundreds of stares on ${his} skin, and <span class="lightsalmon">becomes more of an exhibitionist.</span>`); } if (getBestVision(S.DJ) === 0) { @@ -101,7 +99,7 @@ App.EndWeek.clubReport = function() { S.DJ.skill.DJ += random(1, Math.ceil((S.DJ.intelligence + S.DJ.intelligenceImplant) / 15) + 8); } App.Events.addNode(el, r, "p", "indent"); - if (DL + V.clubSlavesGettingHelp < 10 && V.DJnoSex !== 1 && !slaveResting(S.DJ)) { + if (slaves.length + V.clubSlavesGettingHelp < 10 && V.DJnoSex !== 1 && !slaveResting(S.DJ)) { if (V.legendaryEntertainerID === 0 && S.DJ.prestige === 0 && S.DJ.skill.entertainment >= 100 && S.DJ.devotion > 50) { V.legendaryEntertainerID = S.DJ.ID; } @@ -127,10 +125,10 @@ App.EndWeek.clubReport = function() { } } - if (DL > 0) { + if (slaves.length > 0) { r = []; - if (DL !== 1) { - r.push(App.UI.DOM.makeElement("span", `The ${DL} slaves pleasing citizens in ${V.clubName}`, "bold")); + if (slaves.length !== 1) { + r.push(App.UI.DOM.makeElement("span", `The ${slaves.length} slaves pleasing citizens in ${V.clubName}`, "bold")); } else { r.push(App.UI.DOM.makeElement("span", `The one slave pleasing citizens in ${V.clubName}`, "bold")); } @@ -160,11 +158,8 @@ App.EndWeek.clubReport = function() { } } - if (DL > 0) { + if (slaves.length > 0) { for (const slave of slaves) { - ({ - he, him, his, He, His, wife - } = getPronouns(slave)); if (V.legendaryEntertainerID === 0 && slave.prestige === 0 && slave.skill.entertainment >= 100 && slave.devotion > 50) { V.legendaryEntertainerID = slave.ID; } @@ -213,6 +208,7 @@ App.EndWeek.clubReport = function() { } App.Events.addNode(slaveEntry, r, "div"); + const {He} = getPronouns(slave); App.Events.addNode( slaveEntry, [ @@ -234,7 +230,7 @@ App.EndWeek.clubReport = function() { App.Events.addNode(el, [App.Ads.report("club")], "p", "indented"); // Record statistics gathering - const b = State.variables.facility.club; + const b = V.facility.club; b.whoreIncome = 0; b.customers = 0; b.whoreCosts = 0; @@ -245,8 +241,8 @@ App.EndWeek.clubReport = function() { b.whoreCosts += si.cost; b.rep += si.rep; } - b.adsCosts = State.variables.clubAdsSpending; - b.maintenance = State.variables.club * State.variables.facilityCost * (1.0 + 0.2 * State.variables.clubUpgradePDAs); + b.adsCosts = V.clubAdsSpending; + b.maintenance = V.club * V.facilityCost * (1.0 + 0.2 * V.clubUpgradePDAs); b.totalIncome = b.whoreIncome + b.adsIncome; b.totalExpenses = b.whoreCosts + b.adsCosts + b.maintenance; b.profit = b.totalIncome / b.totalExpenses; diff --git a/src/endWeek/reports/spaReport.js b/src/endWeek/reports/spaReport.js index 0e003ee9be5fa37760c99b1fd52bc7cf9a70727b..b1cbd22ac63c7dda95ec86f27fd9482ce8aba24e 100644 --- a/src/endWeek/reports/spaReport.js +++ b/src/endWeek/reports/spaReport.js @@ -11,7 +11,7 @@ App.EndWeek.spaReport = function() { V.flSex = App.EndWeek.getFLSex(App.Entity.facilities.spa); /* FIXME: should be local, passed as a parameter to saRules */ - function attendantText() { + if (S.Attendant) { let idleBonus = 0; let bonusToggle = 0; let FLsFetish = 0; @@ -270,8 +270,6 @@ App.EndWeek.spaReport = function() { } } - attendantText(); - if (slaves.length > 0) { r = []; if (slaves.length > 1) {