From 2ecfa32df6acb9895605d792e1f64ad5d081b100 Mon Sep 17 00:00:00 2001 From: i107760 <13422-i107760@users.noreply.gitgud.io> Date: Sat, 21 Mar 2020 19:09:58 +0100 Subject: [PATCH] Rework 'saWhore.js' and add new tracked categories to 'recordTemplates.js' --- src/endWeek/saWhore.js | 32 +++++++++++----------- src/interaction/budgets/recordTemplates.js | 3 ++ 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/endWeek/saWhore.js b/src/endWeek/saWhore.js index 13482fd9d87..20b0bd4ab79 100644 --- a/src/endWeek/saWhore.js +++ b/src/endWeek/saWhore.js @@ -307,7 +307,7 @@ window.saWhore = (function saWhore() { r += ` ${slave.slaveName} sees ${his} role as helping people with their sexual needs, and ${he} <span class="trust inc">trusts that ${his} place</span> in society is an important one.`; slave.trust += 1; } - if (slave.assignment === "work in the brothel" && slave.devotion > 50) { + if (slave.assignment === window.Job.BROTHEL && slave.devotion > 50) { r += ` Being so far from your presence <span class="mediumorchid">weakens ${his} intense devotion to you.</span>`; } } @@ -317,7 +317,7 @@ window.saWhore = (function saWhore() { */ function physicalEffects(slave) { let injury = 0; - if (slave.assignment !== "work in the brothel") { + if (slave.assignment !== window.Job.BROTHEL) { if (slave.curatives > 0 || slave.inflationType === "curative") { r += ` The drugs `; if (slave.inflationType === "curative") { @@ -1308,14 +1308,14 @@ window.saWhore = (function saWhore() { cash = Math.trunc(whoreScore * V.whorePriceAdjustment.lowerClass); slave.sexQuality = Math.trunc(slave.sexQuality); } - if (slave.assignment === "work in the brothel") { - cashX(cash, "whoreBrothel", slave); - } else if (slave.assignment === "be the Madam") { - cashX(cash, "whoreBrothel", slave); - } else if (slave.assignment === "whore") { - cashX(cash, "whore", slave); + if (slave.assignment === window.Job.WHORE) { + cashX(cash, "slaveIncomeWhore", slave); + } else if (slave.assignment === window.Job.MADAM) { + cashX(cash, "slaveIncomeMadam", slave); + } else if (slave.assignment === window.Job.BROTHEL) { + cashX(cash, "slaveIncomeBrothel", slave); } else { - cashX(cash, "whoring in an unregistered building", slave); + cashX(cash, "whoring income in an unregistered building", slave); } T.incomeStats.income += cash; } @@ -1588,14 +1588,14 @@ window.saWhore = (function saWhore() { } else { r += `an incident without lasting effect.`; } - if (slave.assignment === "work in the brothel") { - cashX(cashVign, "whoreBrothel", slave); - } else if (slave.assignment === "be the Madam") { - cashX(cash, "whoreBrothel", slave); - } else if (slave.assignment === "whore") { - cashX(cashVign, "whore", slave); + if (slave.assignment === window.Job.WHORE) { + cashX(cashVign, "slaveIncomeWhoreVign", slave); + } else if (slave.assignment === window.Job.MADAM) { + cashX(cashVign, "slaveIncomeMadamVign", slave); + } else if (slave.assignment === window.Job.BROTHEL) { + cashX(cashVign, "slaveIncomeBrothelVign", slave); } else { - cashX(cashVign, "whoring in an unregistered building", slave); + cashX(cashVign, "vignette whoring income in an unregistered building", slave); } T.incomeStats.income += cashVign; } else if (vignette.type === "devotion") { diff --git a/src/interaction/budgets/recordTemplates.js b/src/interaction/budgets/recordTemplates.js index 8a767b4b909..47cb2e587fc 100644 --- a/src/interaction/budgets/recordTemplates.js +++ b/src/interaction/budgets/recordTemplates.js @@ -36,6 +36,7 @@ App.Data.Records.LastWeeksCash = function() { this.slaveIncomeClasses = 0, this.slaveIncomeServer = 0, this.slaveIncomeWhore = 0, + this.slaveIncomeWhoreVign = 0, this.slaveIncomePublic = 0, this.slaveIncomeSubordinate = 0, this.slaveIncomeMilked = 0, @@ -49,7 +50,9 @@ App.Data.Records.LastWeeksCash = function() { this.slaveIncomeRecruiter = 0, this.slaveIncomeArcade = 0, this.slaveIncomeMadam = 0, + this.slaveIncomeMadamVign = 0, this.slaveIncomeBrothel = 0, + this.slaveIncomeBrothelVign = 0, this.slaveIncomeWarden = 0, this.slaveIncomeJail = 0, this.slaveIncomeDj = 0, -- GitLab