diff --git a/src/js/DefaultRules.js b/src/js/DefaultRules.js index 66fc45cb5c8e14110b884034c9fcf0d8c1c85910..b72238771108d0ea966131762d8a8f4fdac01002 100644 --- a/src/js/DefaultRules.js +++ b/src/js/DefaultRules.js @@ -1824,7 +1824,7 @@ window.DefaultRules = (function() { * @param {object} rule */ function ProcessLivingStandard(slave, rule) { - if ((rule.rules.living !== undefined) && (rule.rules.living !== null)) { + if ((rule.livingRules !== undefined) && (rule.livingRules !== null)) { if (setup.facilityCareers.includes(slave.assignment)) { r += ""; // `<br>${slave.slaveName}'s living standards are controlled by ${his} assignment.`; } else if (((slave.assignment === "be your Head Girl") && (V.HGSuite === 1)) || ((slave.assignment === "guard you") && (V.dojo > 1))) { @@ -1834,11 +1834,11 @@ window.DefaultRules = (function() { slave.rules.living = "spare"; r += `<br>Since ${slave.slaveName} is mindbroken, ${his} living standard has been set to spare.`; } - } else if (slave.rules.living !== rule.rules.living) { - if (rule.rules.living !== "luxurious") { + } else if (slave.rules.living !== rule.livingRules) { + if (rule.livingRules !== "luxurious") { if (V.roomsPopulation <= V.rooms - 0.5) { - slave.rules.living = rule.rules.living; - r += `<br>${slave.slaveName}'s living standard has been set to ${rule.rules.living}.`; + slave.rules.living = rule.livingRules; + r += `<br>${slave.slaveName}'s living standard has been set to ${rule.livingRules}.`; if (slave.relationship >= 4) { V.roomsPopulation += 0.5; } else { @@ -1850,7 +1850,7 @@ window.DefaultRules = (function() { } } else { slave.rules.living = rule.rules.living; - r += `<br>${slave.slaveName}'s living standard has been set to ${rule.rules.living}.`; + r += `<br>${slave.slaveName}'s living standard has been set to ${rule.livingRules}.`; } } } @@ -1861,31 +1861,31 @@ window.DefaultRules = (function() { * @param {object} rule */ function ProcessSpeech(slave, rule) { - if ((rule.rules.speech !== undefined) && (rule.rules.speech !== null) && (slave.rules.speech !== rule.rules.speech)) { + if ((rule.speechRules !== undefined) && (rule.speechRules !== null) && (slave.rules.speech !== rule.speechRules)) { if (slave.fetish === "mindbroken") { if ((slave.rules.speech !== "restrictive")) { slave.rules.speech = "restrictive"; r += `<br>Since ${slave.slaveName} is mindbroken, ${his} speech rules have been set to restrictive.`; } } else if (slave.accent === 4) { - if (rule.rules.speech === "accent elimination" && slave.rules.speech !== "language lessons") { + if (rule.speechRules === "accent elimination" && slave.rules.speech !== "language lessons") { slave.rules.speech = "language lessons"; r += `<br>Since ${slave.slaveName} does not know how to talk, ${his} speech rules have been set to language learning.`; } else { slave.rules.speech = "restrictive"; r += `<br>Since ${slave.slaveName} does not know how to talk, ${his} speech rules have been set to restrictive.`; } - } else if (rule.rules.speech === "accent elimination") { + } else if (rule.speechRules === "accent elimination") { if (slave.accent > 0) { slave.rules.speech = "accent elimination"; - r += `<br>${slave.slaveName}'s speech rules have been set to ${rule.rules.speech}.`; + r += `<br>${slave.slaveName}'s speech rules have been set to ${rule.speechRules}.`; } else { slave.rules.speech = "restrictive"; r += `<br>Since ${slave.slaveName} has no accent, ${his} speech rules have been set to restrictive.`; } - } else if (slave.rules.speech !== rule.rules.speech) { - slave.rules.speech = rule.rules.speech; - r += `<br>${slave.slaveName}'s speech rules have been set to ${rule.rules.speech}.`; + } else if (slave.rules.speech !== rule.speechRules) { + slave.rules.speech = rule.speechRules; + r += `<br>${slave.slaveName}'s speech rules have been set to ${rule.speechRules}.`; } } } @@ -1896,10 +1896,10 @@ window.DefaultRules = (function() { */ function ProcessRelationship(slave, rule) { if ((slave.fetish !== "mindbroken")) { - if ((rule.rules.relationship !== undefined) && (rule.rules.relationship !== null)) { - if ((slave.rules.relationship !== rule.rules.relationship )) { - slave.rules.relationship = rule.rules.relationship; - r += `<br>${slave.slaveName}'s relationship rules have been set to ${rule.rules.relationship}.`; + if ((rule.relationshipRules !== undefined) && (rule.relationshipRules !== null)) { + if ((slave.rules.relationship !== rule.relationshipRules )) { + slave.rules.relationship = rule.relationshipRules; + r += `<br>${slave.slaveName}'s relationship rules have been set to ${rule.relationshipRules}.`; } } } @@ -1910,9 +1910,9 @@ window.DefaultRules = (function() { * @param {object} rule */ function ProcessRelease(slave, rule) { - if ((rule.rules.release !== undefined) && (rule.rules.release !== null)) { + if ((rule.releaseRules !== undefined) && (rule.releaseRules !== null)) { let release = 0; - if (rule.rules.release === "restrictive" && + if (rule.releaseRules === "restrictive" && !(["be a subordinate slave", "be confined in the arcade", "be your Head Girl", "get milked", "please you", "serve in the club", "serve in the master suite", "serve the public", "whore", "work a glory hole", "work as a farmhand", "work in the brothel", "work in the dairy"].contains(slave.assignment))) { release = 1; } @@ -1926,9 +1926,9 @@ window.DefaultRules = (function() { slave.rules.release = "restrictive"; r += `<br>Since ${slave.slaveName} is unable to masturbate, ${his} masturbation rules have been set to restrictive.`; } - } else if ((release !== 1) && (slave.rules.release !== rule.rules.release)) { - slave.rules.release = rule.rules.release; - r += `<br>${slave.slaveName}'s masturbation rules have been set to ${rule.rules.release}.`; + } else if ((release !== 1) && (slave.rules.release !== rule.releaseRules)) { + slave.rules.release = rule.releaseRules; + r += `<br>${slave.slaveName}'s masturbation rules have been set to ${rule.releaseRules}.`; } } } @@ -1938,10 +1938,10 @@ window.DefaultRules = (function() { * @param {object} rule */ function ProcessPunishment(slave, rule) { - if ((rule.rules.punishment !== undefined) && (rule.rules.punishment !== null)) { - if ((slave.rules.punishment !== rule.rules.punishment)) { - slave.rules.punishment = rule.rules.punishment; - r += `<br>${slave.slaveName}'s typical punishment has been updated to ${rule.rules.punishment}.`; + if ((rule.standardPunishment !== undefined) && (rule.standardPunishment !== null)) { + if ((slave.rules.punishment !== rule.standardPunishment)) { + slave.rules.punishment = rule.standardPunishment; + r += `<br>${slave.slaveName}'s typical punishment has been updated to ${rule.standardPunishment}.`; } } } @@ -1951,10 +1951,10 @@ window.DefaultRules = (function() { * @param {object} rule */ function ProcessReward(slave, rule) { - if ((rule.rules.reward !== undefined) && (rule.rules.reward !== null)) { - if ((slave.rules.reward !== rule.rules.reward)) { - slave.rules.reward = rule.rules.reward; - r += `<br>${slave.slaveName}'s typical reward has been updated to ${rule.rules.reward}.`; + if ((rule.standardReward !== undefined) && (rule.standardReward !== null)) { + if ((slave.rules.reward !== rule.standardReward)) { + slave.rules.reward = rule.standardReward; + r += `<br>${slave.slaveName}'s typical reward has been updated to ${rule.standardReward}.`; } } } @@ -2862,13 +2862,13 @@ window.DefaultRules = (function() { * @param {object} rule */ function ProcessPornFeedEnabled(slave, rule) { - if (rule.porn.feed === undefined || rule.porn.feed == null) { + if (rule.pornFeed === undefined || rule.pornFeed == null) { return; } - if (rule.porn.feed === slave.porn.feed) { + if (rule.pornFeed === slave.porn.feed) { return; } - slave.porn.feed = rule.porn.feed; + slave.porn.feed = rule.pornFeed; let yesno = slave.porn.feed ? "are now" : "are no longer"; if (slave.porn.feed === 0) { slave.porn.spending = 0; @@ -2878,10 +2878,10 @@ window.DefaultRules = (function() { /** @param {App.Entity.SlaveState} slave */ function ProcessPorn(slave, rule) { - if ((rule.porn.spending !== undefined) && (rule.porn.spending !== null)) { + if ((rule.pornFameSpending !== undefined) && (rule.pornFameSpending !== null)) { if ((slave.porn.prestige < 3)) { - if ((slave.porn.spending !== rule.porn.spending)) { - slave.porn.spending = rule.porn.spending; + if ((slave.porn.spending !== rule.pornFameSpending)) { + slave.porn.spending = rule.pornFameSpending; r += `<br>${slave.slaveName}'s porn publicity has been corrected.`; } } diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js index 95af162c1c81e3a23ca74eef075e9ce481284ea3..6c726bb3d8a7b5f4182ee28ac9ad003174ff43e8 100644 --- a/src/js/rulesAssistantOptions.js +++ b/src/js/rulesAssistantOptions.js @@ -2650,8 +2650,8 @@ window.rulesAssistantOptions = (function() { ["spare"] ]; super("Living standard", pairs); - this.setValue(current_rule.set.rules.living); - this.onchange = (value) => current_rule.set.rules.living = value; + this.setValue(current_rule.set.livingRules); + this.onchange = (value) => current_rule.set.livingRules = value; } } @@ -2664,8 +2664,8 @@ window.rulesAssistantOptions = (function() { ["situational"] ]; super("Typical punishment", pairs); - this.setValue(current_rule.set.rules.punishment); - this.onchange = (value) => current_rule.set.rules.punishment = value; + this.setValue(current_rule.set.standardPunishment); + this.onchange = (value) => current_rule.set.standardPunishment = value; } } @@ -2678,8 +2678,8 @@ window.rulesAssistantOptions = (function() { ["situational"] ]; super("Typical reward", pairs); - this.setValue(current_rule.set.rules.reward); - this.onchange = (value) => current_rule.set.rules.reward = value; + this.setValue(current_rule.set.standardReward); + this.onchange = (value) => current_rule.set.standardReward = value; } } @@ -2693,8 +2693,8 @@ window.rulesAssistantOptions = (function() { ["chastity"] ]; super("Release rules", pairs); - this.setValue(current_rule.set.rules.release); - this.onchange = (value) => current_rule.set.rules.release = value; + this.setValue(current_rule.set.releaseRules); + this.onchange = (value) => current_rule.set.releaseRules = value; } } @@ -2786,8 +2786,8 @@ window.rulesAssistantOptions = (function() { ["restrictive"] ]; super("Speech rules", pairs, true); - this.setValue(current_rule.set.rules.speech); - this.onchange = (value) => current_rule.set.rules.speech = value; + this.setValue(current_rule.set.speechRules); + this.onchange = (value) => current_rule.set.speechRules = value; } } @@ -2799,8 +2799,8 @@ window.rulesAssistantOptions = (function() { ["restrictive"] ]; super("Relationship rules", pairs, true); - this.setValue(current_rule.set.rules.relationship); - this.onchange = (value) => current_rule.set.rules.relationship = value; + this.setValue(current_rule.set.relationshipRules); + this.onchange = (value) => current_rule.set.relationshipRules = value; } } @@ -2811,15 +2811,15 @@ window.rulesAssistantOptions = (function() { ["enabled", 1] ]; super("Porn Broadcasting Status", pairs, true); - this.setValue(current_rule.set.porn.feed); - this.onchange = (value) => current_rule.set.porn.feed = value; + this.setValue(current_rule.set.pornFeed); + this.onchange = (value) => current_rule.set.pornFeed = value; } } class PornList extends ListSelector { constructor() { const pairs = [ - /* ["No broadcasting", -1], **This has changed, it would now use .porn.feed** */ + /* ["No broadcasting", -1], **This has changed, it would now use pornFeed** */ ["no subsidy", 0], ["1000", 1000], ["2000", 2000], @@ -2828,8 +2828,8 @@ window.rulesAssistantOptions = (function() { ["5000", 5000] ]; super("Weekly porn publicity subsidy", pairs); - this.setValue(current_rule.set.porn.spending); - this.onchange = (value) => current_rule.set.porn.spending = value; + this.setValue(current_rule.set.pornFameSpending); + this.onchange = (value) => current_rule.set.pornFameSpending = value; } }