From 1602aee60582a03c51dd86601e0c9a1bf4c02ac9 Mon Sep 17 00:00:00 2001 From: Pregmodder <pregmodder@gmail.com> Date: Sun, 10 Dec 2017 21:27:34 -0500 Subject: [PATCH] fixes and mass tinkering with saRules.tw --- devNotes/VersionChangeLog-Premod+LoliMod.txt | 4 ++++ devNotes/twine JS | 12 ++++++++---- src/init/setupVars.tw | 2 +- src/js/economyJS.tw | 12 ++++++++---- src/uncategorized/costs.tw | 2 ++ src/uncategorized/costsReport.tw | 3 +++ src/uncategorized/saRules.tw | 7 +++---- src/uncategorized/slaveInteract.tw | 10 +++++++--- src/utility/raWidgets.tw | 6 ++++-- src/utility/saRulesWidgets.tw | 1 + 10 files changed, 41 insertions(+), 18 deletions(-) diff --git a/devNotes/VersionChangeLog-Premod+LoliMod.txt b/devNotes/VersionChangeLog-Premod+LoliMod.txt index 8fb36de056b..dae99d7f952 100644 --- a/devNotes/VersionChangeLog-Premod+LoliMod.txt +++ b/devNotes/VersionChangeLog-Premod+LoliMod.txt @@ -4863,4 +4863,8 @@ Pregmod 0.10.3.0 195 -fixes + -saRules tinkering + + 196 + -fixes -saRules tinkering \ No newline at end of file diff --git a/devNotes/twine JS b/devNotes/twine JS index 745409b6403..9e3cd5a4496 100644 --- a/devNotes/twine JS +++ b/devNotes/twine JS @@ -1816,9 +1816,11 @@ postdisplay["doAccordion"] = function (content) { window.LivingRule = Object.freeze({LUXURIOUS: 'luxurious', NORMAL: 'normal', SPARSE: 'sparse'}); window.Job = Object.freeze({ - DAIRY: 'work in the dairy', MASTER_SUITE: 'serve in the master suite', CONCUBINE: 'be your concubine', - BABY_FACTORY: 'labor in the production line', BROTHEL: 'work in the brothel', ARCADE: 'be confined in the arcade', - SERVANT: 'work as a servant', SERVER: 'be a servant', CLUB: 'serve in the club'}); + DAIRY: 'work in the dairy', MILKMAID: 'be the Milkmaid', MASTER_SUITE: 'serve in the master suite', CONCUBINE: 'be your Concubine', + BABY_FACTORY: 'labor in the production line', BROTHEL: 'work in the brothel', MADAM: 'be the Madam', ARCADE: 'be confined in the arcade', + SERVANT: 'work as a servant', SERVER: 'be a servant', STEWARD: 'be the Stewardess', CLUB: 'serve in the club', DJ: 'be the DJ', + JAIL: 'be confined in the cellblock', WARDEN: 'be the Wardeness', CLINIC: 'get treatment in the clinic', NURSE: 'be the Nurse', + HGTOY: 'live with your Head Girl', SCHOOL: 'learn in the schoolroom', TEACHER: 'be the Schoolteacher', SPA: 'rest in the spa', ATTEND: 'be the Attendant'}); window.PersonalAttention = Object.freeze({TRADE: 'trading', WAR: 'warfare', SLAVEING: 'slaving', ENGINEERING: 'engineering', MEDICINE: 'medicine', MAID: 'upkeep'}); window.getCost = function(array) { @@ -2133,9 +2135,11 @@ window.getSlaveCost = function(s) { var foodCost = State.variables.foodCost; var drugsCost = State.variables.drugsCost; - // Living expenses + // Living expenses if((s.assignment === Job.DAIRY && State.variables.dairyRestraintsSetting >= 2) || (s.assignment === Job.ARCADE)) { cost += rulesCost * .75; + } else if(s.assignment === Job.MADAM) { + cost += rulesCost * 2; } else { if(s.livingRules === LivingRule.LUXURIOUS) { cost += rulesCost * (s.relationship >= 4 ? 3 : 4); diff --git a/src/init/setupVars.tw b/src/init/setupVars.tw index c7e02afcf3d..aa6a0f079d5 100644 --- a/src/init/setupVars.tw +++ b/src/init/setupVars.tw @@ -1288,4 +1288,4 @@ Then pick _namePool.random(), or display those names as possible choices, or do <<set setup.dickAccessories = [{name: "No default setting", value: "no default setting"}, {name: "None", value: "none"}, {name: "Chastity cage", value: "chastity"}, {name: "Anal chastity", value: "anal chastity"}, {name: "Combined chastity", value: "combined chastity"}]>> <<set setup.buttplugs = [{name: "No default setting", value: "no default setting"}, {name: "None", value: "none"}, {name: "Standard plug", value: "plug"}, {name: "Long plug", value: "long plug", rs: "buyBigPlugs"}, {name: "Large plug", value: "large plug"}, {name: "Long, large plug", value: "long, large plug", rs: "buyBigPlugs"}, {name: "Huge plug", value: "huge plug"}, {name: "Long, huge plug", value: "long, huge plug", rs: "buyBigPlugs"}]>> - +<<set setup.facilityCareers = ["work in the dairy", "work as a servant", "serve in the master suite", "serve in the club", "rest in the spa", "learn in the schoolroom", "be the DJ", "be the Attendant", "be the Madam", "be the Schoolteacher", "be the Stewardess", "be the Milkmaid", "be the Wardeness", "be your Concubine", "be the Nurse", "live with your Head Girl", "be confined in the arcade", "get treatment in the clinic", "work in the brothel", "be confined in the cellblock"]>> diff --git a/src/js/economyJS.tw b/src/js/economyJS.tw index 3bad3b9deec..754163b8f88 100644 --- a/src/js/economyJS.tw +++ b/src/js/economyJS.tw @@ -2,9 +2,11 @@ window.LivingRule = Object.freeze({LUXURIOUS: 'luxurious', NORMAL: 'normal', SPARSE: 'sparse'}); window.Job = Object.freeze({ - DAIRY: 'work in the dairy', MASTER_SUITE: 'serve in the master suite', CONCUBINE: 'be your concubine', - BABY_FACTORY: 'labor in the production line', BROTHEL: 'work in the brothel', ARCADE: 'be confined in the arcade', - SERVANT: 'work as a servant', SERVER: 'be a servant', CLUB: 'serve in the club'}); + DAIRY: 'work in the dairy', MILKMAID: 'be the Milkmaid', MASTER_SUITE: 'serve in the master suite', CONCUBINE: 'be your Concubine', + BABY_FACTORY: 'labor in the production line', BROTHEL: 'work in the brothel', MADAM: 'be the Madam', ARCADE: 'be confined in the arcade', + SERVANT: 'work as a servant', SERVER: 'be a servant', STEWARD: 'be the Stewardess', CLUB: 'serve in the club', DJ: 'be the DJ', + JAIL: 'be confined in the cellblock', WARDEN: 'be the Wardeness', CLINIC: 'get treatment in the clinic', NURSE: 'be the Nurse', + HGTOY: 'live with your Head Girl', SCHOOL: 'learn in the schoolroom', TEACHER: 'be the Schoolteacher', SPA: 'rest in the spa', ATTEND: 'be the Attendant'}); window.PersonalAttention = Object.freeze({TRADE: 'trading', WAR: 'warfare', SLAVEING: 'slaving', ENGINEERING: 'engineering', MEDICINE: 'medicine', MAID: 'upkeep'}); window.getCost = function(array) { @@ -319,9 +321,11 @@ window.getSlaveCost = function(s) { var foodCost = State.variables.foodCost; var drugsCost = State.variables.drugsCost; - // Living expenses + // Living expenses if((s.assignment === Job.DAIRY && State.variables.dairyRestraintsSetting >= 2) || (s.assignment === Job.ARCADE)) { cost += rulesCost * .75; + } else if(s.assignment === Job.MADAM) { + cost += rulesCost * 2; } else { if(s.livingRules === LivingRule.LUXURIOUS) { cost += rulesCost * (s.relationship >= 4 ? 3 : 4); diff --git a/src/uncategorized/costs.tw b/src/uncategorized/costs.tw index 4a983bdca57..49f846f19fb 100644 --- a/src/uncategorized/costs.tw +++ b/src/uncategorized/costs.tw @@ -96,6 +96,8 @@ <<if ($slaves[$i].assignment == "work in the dairy" && $dairyRestraintsSetting >= 2) || ($slaves[$i].assignment == "be confined in the arcade")>> <<set $costs += ($rulesCost*.75)>> +<<elseif ($slaves[$i].assignment == "be the madam")>> + <<set $costs += ($rulesCost*2)>> <<else>> <<if $slaves[$i].livingRules == "luxurious">> <<if $slaves[$i].relationship >= 4>> diff --git a/src/uncategorized/costsReport.tw b/src/uncategorized/costsReport.tw index 583700d0067..a4f82aae59a 100644 --- a/src/uncategorized/costsReport.tw +++ b/src/uncategorized/costsReport.tw @@ -226,6 +226,9 @@ <<if ($slaves[$i].assignment == "work in the dairy" && $dairyRestraintsSetting >= 2) || ($slaves[$i].assignment == "be confined in the arcade")>> <br> Living expenses: ¤<<print ($rulesCost*.75)>> <<set $individualCosts += ($rulesCost*.75)>> + <<elseif ($slaves[$i].assignment == "be the madam")>> + <br> Living expenses: ¤<<print ($rulesCost*2)>> + <<set $individualCosts += ($rulesCost*2)>> <<else>> <<if $slaves[$i].livingRules == "luxurious">> <<if $slaves[$i].relationship >= 4>> diff --git a/src/uncategorized/saRules.tw b/src/uncategorized/saRules.tw index a015bec176a..425e56b77fc 100644 --- a/src/uncategorized/saRules.tw +++ b/src/uncategorized/saRules.tw @@ -87,10 +87,8 @@ <</if>> /* closes releaseRules not restrictive */ <</if>> - <<if ($slaves[$i].livingRules == "luxurious")>> - She is @@.hotpink;very happy@@ with her private room in $brothelName and @@.mediumaquamarine;trusts@@ you a bit more for placing her in charge of it. - <<set $slaves[$i].devotion += 1, $slaves[$i].trust += 1>> - <</if>> + She is @@.hotpink;very happy@@ with her private room in $brothelName and @@.mediumaquamarine;trusts@@ you a bit more for placing her in charge of it. + <<set $slaves[$i].devotion += 1, $slaves[$i].trust += 1>> <<if ($universalRulesConsent == 0)>> <<if ($slaves[$i].releaseRules != "restrictive")>> @@ -134,6 +132,7 @@ <<set _punishments = 0>> <<set _rewards = 3>> <</if>> + <<case "work in the brothel">> <<default>> <<if $slaves[$i].devotion < -50>> is so unhappy that she has little interest in getting off<<if ($slaves[$i].releaseRules != "permissive")>>, making the rule restricting her sexual outlets superfluous<</if>>. diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw index f43b5f41e34..8155e917f4c 100644 --- a/src/uncategorized/slaveInteract.tw +++ b/src/uncategorized/slaveInteract.tw @@ -1231,9 +1231,13 @@ Hormones: <strong><span id="hormones"> <</if>> <</for>> Living standard: ''<span id="livingRules">$activeSlave.livingRules</span>.'' - <<link "Spare">><<set $activeSlave.livingRules = "spare">><<replace "#livingRules">>$activeSlave.livingRules<</replace>><</link>> | - <<link "Normal">><<set $activeSlave.livingRules = "normal">><<replace "#livingRules">>$activeSlave.livingRules<</replace>><</link>> | - <<if $roomsPopulation <= $rooms-0.5>><<link "Luxurious">><<set $activeSlave.livingRules = "luxurious">><<replace "#livingRules">>$activeSlave.livingRules<</replace>><</link>><<else>>//No luxurious rooms available//<</if>> + <<if setup.facilityCareers.includes($activeSlave.assignment)>> + //Her living conditions are managed by her assignment.// + <<else>> + <<link "Spare">><<set $activeSlave.livingRules = "spare">><<replace "#livingRules">>$activeSlave.livingRules<</replace>><</link>> | + <<link "Normal">><<set $activeSlave.livingRules = "normal">><<replace "#livingRules">>$activeSlave.livingRules<</replace>><</link>> | + <<if $roomsPopulation <= $rooms-0.5>><<link "Luxurious">><<set $activeSlave.livingRules = "luxurious">><<replace "#livingRules">>$activeSlave.livingRules<</replace>><</link>><<else>>//No luxurious rooms available//<</if>> + <</if>> <br>Typical punishment: ''<span id="standardPunishment">$activeSlave.standardPunishment</span>.'' <<link "Confinement">><<set $activeSlave.standardPunishment = "confinement">><<replace "#standardPunishment">>$activeSlave.standardPunishment<</replace>><</link>> | diff --git a/src/utility/raWidgets.tw b/src/utility/raWidgets.tw index 913a1604259..f5f6d909c65 100644 --- a/src/utility/raWidgets.tw +++ b/src/utility/raWidgets.tw @@ -3780,7 +3780,7 @@ Your brand design is ''$brandDesign.'' /* Closes single for loop for growth drugs. */ /* Other Drugs */ -<<set _tempDrugsDrugs = ["psychosuppresants", "no drugs", "steroids", "hormone enhancers", "hormone blockers", "anti-aging cream", "growth stimulants", "sag-B-gone", "male hormone injections", "female hormone injections", "none"]>> +<<set _tempDrugsDrugs = ["psychosuppressants", "no drugs", "steroids", "hormone enhancers", "hormone blockers", "anti-aging cream", "growth stimulants", "sag-B-gone", "male hormone injections", "female hormone injections", "none"]>> <<if _tempDrugsDrugs.includes(_combinedRule.drug)>> <<if _tempDrugsDrugs.includes($args[0].drugs) && ($args[0].drugs != _combinedRule.drug)>> <<switch _combinedRule.drug>> @@ -4173,7 +4173,9 @@ Your brand design is ''$brandDesign.'' <<if $args[0].fuckdoll == 0>> <<if (def _combinedRule.livingRules) && (_combinedRule.livingRules !== "no default setting")>> -<<if ($args[0].fetish == "mindbroken")>> +<<if setup.facilityCareers.includes($args[0].assignemnt)>> + <br>$args[0].slaveName's living standards are controlled by her assignment. +<<elseif ($args[0].fetish == "mindbroken")>> <<if ($args[0].livingRules !== "spare")>> <<set $args[0].livingRules = "spare">> <br>Since $args[0].slaveName is mindbroken her living standard has been set to spare. diff --git a/src/utility/saRulesWidgets.tw b/src/utility/saRulesWidgets.tw index 6b6930199f3..0020b840e03 100644 --- a/src/utility/saRulesWidgets.tw +++ b/src/utility/saRulesWidgets.tw @@ -827,6 +827,7 @@ and discovers that she isn't terribly exciting; @@.lightcoral;she's got a normal sexuality.@@ <</if>> <</if>> + <</if>> <</widget>> -- GitLab