From 80fbf2c43e958d30262be46e6ca9f43a70594e65 Mon Sep 17 00:00:00 2001 From: Arkerthan <arkerthan@gmail.com> Date: Fri, 19 Feb 2021 18:22:45 +0100 Subject: [PATCH] Replace setup with App.Data.misc in JS files. setup is literally a copy of misc. --- src/Corporation/manageCorporation.js | 2 +- .../backwardsCompatibility/datatypeCleanup.js | 2 +- src/endWeek/economics/neighborsDevelopment.js | 4 +- src/endWeek/saAgent.js | 2 +- src/endWeek/saChoosesOwnJob.js | 2 +- src/endWeek/saClothes.js | 2 +- src/endWeek/saLongTermEffects.js | 4 +- src/endWeek/saLongTermMentalEffects.js | 2 +- src/endWeek/saPregnancy.js | 2 +- src/endWeek/saRecruitGirls.js | 4 +- src/endWeek/saServeThePublic.js | 8 +-- src/endWeek/saSocialEffects.js | 2 +- src/endWeek/saWhore.js | 8 +-- src/events/intro/customizeSlaveTrade.js | 14 ++--- src/events/intro/initNationalities.js | 4 +- src/events/intro/pcAppearance.js | 4 +- .../farmyard/shows/farmShowsIncome.js | 2 +- .../farmyard/shows/saFarmyardShows.js | 4 +- src/facilities/nursery/utils/nurseryUtils.js | 12 ++-- .../surgery/surgeryPassageExotic.js | 2 +- src/interaction/rename.js | 4 +- src/interaction/siCustom.js | 18 +++--- src/interaction/siRules.js | 2 +- src/js/DefaultRules.js | 4 +- src/js/rulesAssistantOptions.js | 2 +- src/js/slaveSummaryWidgets.js | 2 +- src/js/statsChecker/statsChecker.js | 2 +- src/js/utilsMisc.js | 2 +- src/js/wombJS.js | 2 +- .../specificMarkets/customSlaveMarket.js | 4 +- src/markets/specificMarkets/huskSlave.js | 4 +- src/npc/descriptions/belly/belly.js | 2 +- src/npc/descriptions/crotch/crotch.js | 2 +- src/npc/descriptions/describeBrands.js | 2 +- src/npc/descriptions/describePiercings.js | 2 +- src/npc/descriptions/describeScars.js | 4 +- src/npc/descriptions/mouth.js | 2 +- src/npc/generate/generateMarketSlave.js | 26 ++++----- src/npc/generate/generateNewSlaveJS.js | 2 +- src/npc/generate/heroCreator.js | 16 ++--- src/npc/generate/newChildIntro.js | 14 ++--- src/npc/generate/newSlaveIntro.js | 2 +- src/npc/generate/slaveGenerationJS.js | 58 +++++++++---------- src/npc/infants/infantSummary.js | 2 +- src/npc/startingGirls/startingGirls.js | 2 +- src/uncategorized/pRivalryCapture.js | 2 +- 46 files changed, 135 insertions(+), 135 deletions(-) diff --git a/src/Corporation/manageCorporation.js b/src/Corporation/manageCorporation.js index 1910d33945e..9735544ef96 100644 --- a/src/Corporation/manageCorporation.js +++ b/src/Corporation/manageCorporation.js @@ -1,7 +1,7 @@ App.Corporate.corpRaces = function() { const el = new DocumentFragment(); App.UI.DOM.appendNewElement("div", el, `The corporation enslaves people of the following race${V.corp.SpecRaces.length === 1 ? ``:`s`}:`); - for (const [race, capRace] of setup.filterRaces) { + for (const [race, capRace] of App.Data.misc.filterRaces) { const r = []; if (V.corp.SpecRaces.includes(race)) { r.push(capRace); diff --git a/src/data/backwardsCompatibility/datatypeCleanup.js b/src/data/backwardsCompatibility/datatypeCleanup.js index c4709a23e20..fd94e509601 100644 --- a/src/data/backwardsCompatibility/datatypeCleanup.js +++ b/src/data/backwardsCompatibility/datatypeCleanup.js @@ -2422,7 +2422,7 @@ App.Update.neighborArcologyCheatDatatypeCleanup = function() { } } } - const raceArray = Array.from(setup.filterRaces.keys()); + const raceArray = Array.from(App.Data.misc.filterRaces.keys()); if (arc.FSSupremacist !== "unset" && !raceArray.includes(arc.FSSupremacistRace)) { arc.FSSupremacistRace = raceArray.random(); } diff --git a/src/endWeek/economics/neighborsDevelopment.js b/src/endWeek/economics/neighborsDevelopment.js index c119bd4ad16..295a9b24219 100644 --- a/src/endWeek/economics/neighborsDevelopment.js +++ b/src/endWeek/economics/neighborsDevelopment.js @@ -2617,7 +2617,7 @@ App.EndWeek.neighborsDevelopment = function() { } switch (validFSes.random()) { case "FSSubjugationist": { - const subjugationRace = Array.from(setup.filterRaces.keys()).random(); + const subjugationRace = Array.from(App.Data.misc.filterRaces.keys()).random(); if ((arc.FSSupremacist === "unset") || (subjugationRace !== arc.FSSupremacistRace)) { r.push(`${desc} preoccupied by a racial animus towards ${subjugationRace} people, leading the arcology to <span class="yellow">adopt ${subjugationRace} Subjugation.</span>`); arc.FSSubjugationist = 5; @@ -2627,7 +2627,7 @@ App.EndWeek.neighborsDevelopment = function() { break; } case "FSSupremacist": { - const supremacistRace = Array.from(setup.filterRaces.keys()).random(); + const supremacistRace = Array.from(App.Data.misc.filterRaces.keys()).random(); if ((arc.FSSubjugationist === "unset") || (supremacistRace !== arc.FSSubjugationistRace)) { r.push(`${desc} preoccupied by belief in the superiority of the ${supremacistRace} race, leading the arcology to <span class="yellow">adopt ${supremacistRace} Supremacy.</span>`); arc.FSSupremacist = 5; diff --git a/src/endWeek/saAgent.js b/src/endWeek/saAgent.js index 58d1a181a8a..c4fa86cf620 100644 --- a/src/endWeek/saAgent.js +++ b/src/endWeek/saAgent.js @@ -284,7 +284,7 @@ App.SlaveAssignment.agent = function(slave) { slave.hips += 1; } if (slave.bellyPreg >= 1500) { - if (setup.fakeBellies.includes(slave.bellyAccessory)) { + if (App.Data.misc.fakeBellies.includes(slave.bellyAccessory)) { slave.bellyAccessory = "none"; } if ((slave.preg > slave.pregData.normalBirth / 2) && (slave.lactation === 0) && slave.health.condition >= -20 && slave.weight > -30) { diff --git a/src/endWeek/saChoosesOwnJob.js b/src/endWeek/saChoosesOwnJob.js index f6676c62fda..cc1a4e7f439 100644 --- a/src/endWeek/saChoosesOwnJob.js +++ b/src/endWeek/saChoosesOwnJob.js @@ -121,7 +121,7 @@ App.SlaveAssignment.choosesOwnJob = (function() { choice.push(`is uneducated, so ${he} <span class="job change">sits ${himself} down to learn.</span>`); choice.push(assignJob(slave, "take classes")); } - } else if ((S.Attendant && V.universalRulesAssignsSelfFacility === 1 && V.spa > spaL) && (slave.devotion < 45 || slave.trust < 45 || (slave.sexualFlaw !== "none" && !setup.paraphiliaList.includes(slave.sexualFlaw)) || slave.behavioralFlaw !== "none")) { + } else if ((S.Attendant && V.universalRulesAssignsSelfFacility === 1 && V.spa > spaL) && (slave.devotion < 45 || slave.trust < 45 || (slave.sexualFlaw !== "none" && !App.Data.misc.paraphiliaList.includes(slave.sexualFlaw)) || slave.behavioralFlaw !== "none")) { choice.push(`could use some counseling, so ${he} <span class="job change">decides to visit ${V.spaName}.</span>`); choice.push(assignJob(slave, "rest in the spa")); } else if (slave.devotion <= 50 && canWalk(slave) && canSee(slave)) { diff --git a/src/endWeek/saClothes.js b/src/endWeek/saClothes.js index 4c6914b722a..3e842c5d0e4 100644 --- a/src/endWeek/saClothes.js +++ b/src/endWeek/saClothes.js @@ -765,7 +765,7 @@ App.SlaveAssignment.clothes = (function() { if (slave.belly > 10000) { r.push(`${His} pregnancy support band takes some weight off ${his} back, but it does little beyond that.`); } - } else if (setup.fakeBellies.includes(slave.bellyAccessory)) { + } else if (App.Data.misc.fakeBellies.includes(slave.bellyAccessory)) { if (slave.weight > 130) { r.push(`${He} has trouble keeping ${his} fake belly strapped around ${his} huge gut, forcing it to be removed to prevent damage.`); slave.bellyAccessory = "none"; diff --git a/src/endWeek/saLongTermEffects.js b/src/endWeek/saLongTermEffects.js index f6af3c8f8ed..a38ef75d3f3 100644 --- a/src/endWeek/saLongTermEffects.js +++ b/src/endWeek/saLongTermEffects.js @@ -1160,7 +1160,7 @@ App.SlaveAssignment.longTermEffects = (function() { * */ function inflationEffects(slave) { - if (setup.fakeBellies.includes(slave.bellyAccessory)) { + if (App.Data.misc.fakeBellies.includes(slave.bellyAccessory)) { r.push(`${He} has trouble keeping ${himself} full of`); switch (slave.inflationType) { case "cum": @@ -1512,7 +1512,7 @@ App.SlaveAssignment.longTermEffects = (function() { } } } else if (slave.bellyImplant >= 1500) { - if (setup.fakeBellies.includes(slave.bellyAccessory)) { + if (App.Data.misc.fakeBellies.includes(slave.bellyAccessory)) { r.push(`${His} implant rounded belly renders ${his} fake one moot.`); slave.bellyAccessory = "none"; } diff --git a/src/endWeek/saLongTermMentalEffects.js b/src/endWeek/saLongTermMentalEffects.js index f5abed09c27..785ae2e977a 100644 --- a/src/endWeek/saLongTermMentalEffects.js +++ b/src/endWeek/saLongTermMentalEffects.js @@ -1635,7 +1635,7 @@ App.SlaveAssignment.longTermMentalEffects = (function() { } else if (slave.bellyImplant >= 60000) { r.push(`${His} paraphilia is satisfied by ${his} overfilled belly implant.`); slave.paraphiliaSatisfied = 1; - } else if (setup.fakeBellies.includes(slave.bellyAccessory)) { + } else if (App.Data.misc.fakeBellies.includes(slave.bellyAccessory)) { r.push(`${He} <span class="devotion dec">loathes</span> being forced to carry a fake pregnancy.`); slave.paraphiliaSatisfied = -1; slave.devotion -= 3; diff --git a/src/endWeek/saPregnancy.js b/src/endWeek/saPregnancy.js index 8b4fb4464c9..1abb3e3c68f 100644 --- a/src/endWeek/saPregnancy.js +++ b/src/endWeek/saPregnancy.js @@ -757,7 +757,7 @@ App.SlaveAssignment.pregnancy = (function() { r.push(`${His} areolae darken with ${his} progressing pregnancy.`); } } else if (slave.bellyPreg >= 1500) { - if (setup.fakeBellies.includes(slave.bellyAccessory)) { + if (App.Data.misc.fakeBellies.includes(slave.bellyAccessory)) { r.push(`${His} growing pregnancy renders ${his} fake belly moot.`); slave.bellyAccessory = "none"; } diff --git a/src/endWeek/saRecruitGirls.js b/src/endWeek/saRecruitGirls.js index 182e9eae15c..ef525abaa34 100644 --- a/src/endWeek/saRecruitGirls.js +++ b/src/endWeek/saRecruitGirls.js @@ -853,7 +853,7 @@ App.SlaveAssignment.recruitGirls = (function() { r.push(`${He} does ${his} best to convince them that being your slave whore will be safer and healthier than streetwalking.`); } } else if (V.recruiterTarget === "expectant mothers") { // now you can ginger too - if ((S.Recruiter.belly >= 1500 || setup.fakeBellies.includes(S.Recruiter.bellyAccessory) && S.Recruiter.weight < 130) || S.Recruiter.belly >= 100000) { + if ((S.Recruiter.belly >= 1500 || App.Data.misc.fakeBellies.includes(S.Recruiter.bellyAccessory) && S.Recruiter.weight < 130) || S.Recruiter.belly >= 100000) { if (S.Recruiter.preg > S.Recruiter.pregData.normalBirth / 8) { r.push(`Since ${he}'s visibly pregnant ${himself}, ${he} speaks with authority when ${he} says that Free Cities medicine can keep them and their pregnancies safe and healthy.`); } else { @@ -1091,7 +1091,7 @@ App.SlaveAssignment.recruitGirls = (function() { if (arcology.FSRestart !== "unset") { pushFS(`${He} posts plenty of seductive photos emphasizing ${his} feminine curves, including lewds showing off ${his} natural vagina, bringing more attention to your campaign for natural females.`); seed += 1; - } else if (slave.bellyPreg >= 1500 || setup.fakeBellies.includes(slave.bellyAccessory)) { + } else if (slave.bellyPreg >= 1500 || App.Data.misc.fakeBellies.includes(slave.bellyAccessory)) { if (slave.bellyPreg >= 1500) { pushFS(`${He} unashamedly live streams an obstetric health check in the nude, promising to broadcast similar footage right up until, and during, the birth.`); seed += 4; diff --git a/src/endWeek/saServeThePublic.js b/src/endWeek/saServeThePublic.js index e4497d6bdb7..05017788ef2 100644 --- a/src/endWeek/saServeThePublic.js +++ b/src/endWeek/saServeThePublic.js @@ -874,10 +874,10 @@ App.SlaveAssignment.serveThePublic = (function() { slave.boobsMilk = 0; } - if (slave.bellyPreg >= 1500 || setup.fakeBellies.includes(slave.bellyAccessory) || slave.bellyImplant >= 1500) { + if (slave.bellyPreg >= 1500 || App.Data.misc.fakeBellies.includes(slave.bellyAccessory) || slave.bellyImplant >= 1500) { if (arcology.FSRepopulationFocus !== "unset") { r += ` In the new culture of ${arcology.name}, ${his}`; - if (setup.fakeBellies.includes(slave.bellyAccessory) || slave.bellyImplant >= 1500) { + if (App.Data.misc.fakeBellies.includes(slave.bellyAccessory) || slave.bellyImplant >= 1500) { r += ` apparent`; } r += ` pregnancy gets ${him} lots of attention.`; @@ -885,13 +885,13 @@ App.SlaveAssignment.serveThePublic = (function() { r += ` It's currently trendy to be ripe with child, so ${his} pregnancy gets ${him} lots of attention.`; } else if (arcology.FSRestart !== "unset") { r += ` In the new culture of ${arcology.name}, ${his}`; - if (setup.fakeBellies.includes(slave.bellyAccessory) || slave.bellyImplant >= 1500) { + if (App.Data.misc.fakeBellies.includes(slave.bellyAccessory) || slave.bellyImplant >= 1500) { r += ` apparent`; } r += ` pregnancy is a massive turn off to citizens.`; } else if (arcology.FSGenderFundamentalist !== "unset") { r += ` The new respect for slave fertility ensures that ${he} gets just as much love as slaves without pregnant bellies`; - if (setup.fakeBellies.includes(slave.bellyAccessory) || slave.bellyImplant >= 1500) { + if (App.Data.misc.fakeBellies.includes(slave.bellyAccessory) || slave.bellyImplant >= 1500) { r += `, even if ${his} bump isn't real`; } r += `.`; diff --git a/src/endWeek/saSocialEffects.js b/src/endWeek/saSocialEffects.js index 3a326959129..6a9b1d5f391 100644 --- a/src/endWeek/saSocialEffects.js +++ b/src/endWeek/saSocialEffects.js @@ -239,7 +239,7 @@ App.SlaveAssignment.saSocialEffects = function(slave) { } else if (slave.pregWeek < 0) { t.push(new SocialEffect("Repopulationist", 2, "Recently gave birth", `Society is <span class="green">pleased</span> by ${slave.slaveName}'s recent birth.`)); - } else if (setup.fakeBellies.includes(slave.bellyAccessory)) { + } else if (App.Data.misc.fakeBellies.includes(slave.bellyAccessory)) { t.push(new SocialEffect("", 0.01, "Fake belly (Repopulation Focus)", `Society is <span class="green">placated</span> by ${slave.slaveName}'s fake belly.`)); } else if (V.arcologies[0].FSSubjugationist !== "unset" && (slave.race === V.arcologies[0].FSSubjugationistRace)) { diff --git a/src/endWeek/saWhore.js b/src/endWeek/saWhore.js index b7c80135853..e65a21af428 100644 --- a/src/endWeek/saWhore.js +++ b/src/endWeek/saWhore.js @@ -950,10 +950,10 @@ App.SlaveAssignment.whore = (function() { slave.boobsMilk = 0; } - if (slave.bellyPreg >= 1500 || setup.fakeBellies.includes(slave.bellyAccessory) || slave.bellyImplant >= 1500) { + if (slave.bellyPreg >= 1500 || App.Data.misc.fakeBellies.includes(slave.bellyAccessory) || slave.bellyImplant >= 1500) { if (arcology.FSRepopulationFocus !== "unset") { r += ` In the new culture of ${arcology.name}, ${his} pregnancy makes ${him} a profitable whore`; - if (setup.fakeBellies.includes(slave.bellyAccessory) || slave.bellyImplant >= 1500) { + if (App.Data.misc.fakeBellies.includes(slave.bellyAccessory) || slave.bellyImplant >= 1500) { r += `, even if it's not real`; } r += `.`; @@ -961,13 +961,13 @@ App.SlaveAssignment.whore = (function() { r += ` It's currently trendy to plow a whore laden with child, a role ${he} fits perfectly.`; } else if (arcology.FSRestart !== "unset") { r += ` In the new culture of ${arcology.name}, ${his}`; - if (setup.fakeBellies.includes(slave.bellyAccessory) || slave.bellyImplant >= 1500) { + if (App.Data.misc.fakeBellies.includes(slave.bellyAccessory) || slave.bellyImplant >= 1500) { r += ` apparent`; } r += ` pregnancy is a massive turn off to potential customers.`; } else if (arcology.FSGenderFundamentalist !== "unset") { r += ` The new respect for traditional gender roles has given many citizens a taste for pregnant whores`; - if (setup.fakeBellies.includes(slave.bellyAccessory) || slave.bellyImplant >= 1500) { + if (App.Data.misc.fakeBellies.includes(slave.bellyAccessory) || slave.bellyImplant >= 1500) { r += `, even if they only look pregnant`; } r += `.`; diff --git a/src/events/intro/customizeSlaveTrade.js b/src/events/intro/customizeSlaveTrade.js index eb606d0398d..162c1cd4ba1 100644 --- a/src/events/intro/customizeSlaveTrade.js +++ b/src/events/intro/customizeSlaveTrade.js @@ -50,7 +50,7 @@ App.Intro.CustomSlaveTrade = function() { div = document.createElement("div"); App.UI.DOM.appendNewElement("span", div, `Filter by Race: `); array = []; - for (const [race, capRace] of setup.filterRaces) { + for (const [race, capRace] of App.Data.misc.filterRaces) { if (baseControlsFilter === race) { array.push( App.UI.DOM.disabledLink( @@ -76,7 +76,7 @@ App.Intro.CustomSlaveTrade = function() { div = document.createElement("div"); App.UI.DOM.appendNewElement("span", div, `Filter by Region: `); array = []; - for (const region of setup.filterRegions) { + for (const region of App.Data.misc.filterRegions) { if (baseControlsFilter === uncapFirstChar(region).replace(/[ -]/g, '')) { array.push( App.UI.DOM.disabledLink( @@ -109,7 +109,7 @@ App.Intro.CustomSlaveTrade = function() { list = document.createElement("UL"); list.classList.add("customize-slave-trade-ul"); if (baseControlsFilter === "all") { - for (const nation of setup.baseNationalities) { + for (const nation of App.Data.misc.baseNationalities) { const li = document.createElement("LI"); li.classList.add("customize-slave-trade-li"); li.append(nation); @@ -166,9 +166,9 @@ App.Intro.CustomSlaveTrade = function() { App.UI.DOM.appendNewElement("div", p, `By dominant race/ethnicity (hover over the name to see the nationalities affected):`); list = document.createElement("UL"); list.classList.add("customize-slave-trade-ul"); - for (const race of setup.filterRaces.keys()) { - const racialNationalities = setup.baseNationalities.filter(function(n) { - let races = setup.raceSelector[n] || setup.raceSelector['']; + for (const race of App.Data.misc.filterRaces.keys()) { + const racialNationalities = App.Data.misc.baseNationalities.filter(function(n) { + let races = App.Data.misc.raceSelector[n] || App.Data.misc.raceSelector['']; return races[race] * 3.5 > hashSum(races); }); @@ -209,7 +209,7 @@ App.Intro.CustomSlaveTrade = function() { } } else { /* Filtered pop controls */ - const controlsNationality = setup.nationalitiesByRace[baseControlsFilter] || setup[baseControlsFilter + 'Nationalities']; + const controlsNationality = App.Data.misc.nationalitiesByRace[baseControlsFilter] || setup[baseControlsFilter + 'Nationalities']; const keys = Object.keys(controlsNationality); for (const nation of keys) { const li = document.createElement("LI"); diff --git a/src/events/intro/initNationalities.js b/src/events/intro/initNationalities.js index cc2e72d61a1..a21ab8e594c 100644 --- a/src/events/intro/initNationalities.js +++ b/src/events/intro/initNationalities.js @@ -597,7 +597,7 @@ App.Intro.initNationalities = function() { } if (needLocalNationalities) { // FIXME: equal distributions? probably should use weighted variety instead - V.nationalities = arr2obj(setup.baseNationalities); + V.nationalities = arr2obj(App.Data.misc.baseNationalities); } } else { const continentalDefaults = new Map([ @@ -639,7 +639,7 @@ App.Intro.initNationalities = function() { if (V.internationalVariety === 0) { // weighted hashMerge(V.nationalities, App.Data.NationalityPresets.Vanilla.get("Vanilla Global")); } else { // normalized - V.nationalities = arr2obj(setup.baseNationalities); + V.nationalities = arr2obj(App.Data.misc.baseNationalities); } } }; diff --git a/src/events/intro/pcAppearance.js b/src/events/intro/pcAppearance.js index f2639d16b93..8ab31e42072 100644 --- a/src/events/intro/pcAppearance.js +++ b/src/events/intro/pcAppearance.js @@ -6,11 +6,11 @@ App.UI.Player.appearance = function(options) { .addComment("For best result capitalize it.").pulldown(); options.addOption("Your race is", "race", V.PC).showTextBox() - .addValueList(Array.from(setup.filterRaces, (k => [k[1], k[0]]))); + .addValueList(Array.from(App.Data.misc.filterRaces, (k => [k[1], k[0]]))); if (V.cheatMode) { options.addOption("Your race is", "origRace", V.PC).showTextBox() - .addValueList(Array.from(setup.filterRaces, (k => [k[1], k[0]]))); + .addValueList(Array.from(App.Data.misc.filterRaces, (k => [k[1], k[0]]))); } options.addOption("Your skin tone is", "skin", V.PC).showTextBox() diff --git a/src/facilities/farmyard/shows/farmShowsIncome.js b/src/facilities/farmyard/shows/farmShowsIncome.js index d8d51fd2540..0ed6ff311e5 100644 --- a/src/facilities/farmyard/shows/farmShowsIncome.js +++ b/src/facilities/farmyard/shows/farmShowsIncome.js @@ -102,7 +102,7 @@ App.Facilities.Farmyard.farmShowsIncome = function(slave) { } if (arcology.FSGenderFundamentalist !== "unset") { - if (isPreg(slave) || setup.fakeBellies.includes(slave.bellyAccessory)) { + if (isPreg(slave) || App.Data.misc.fakeBellies.includes(slave.bellyAccessory)) { cash *= 1.1; repX(10, "shows"); } else { diff --git a/src/facilities/farmyard/shows/saFarmyardShows.js b/src/facilities/farmyard/shows/saFarmyardShows.js index 9b863f728ef..c001dc7cb4f 100644 --- a/src/facilities/farmyard/shows/saFarmyardShows.js +++ b/src/facilities/farmyard/shows/saFarmyardShows.js @@ -86,8 +86,8 @@ App.Facilities.Farmyard.putOnShows = function(slave) { } if (arcology.FSGenderFundamentalist !== "unset") { - if (isPreg(slave) || setup.fakeBellies.includes(slave.bellyAccessory)) { - r.push(`${His} viewers <span class="reputation inc">approve</span> of the fact that ${he} is sporting a baby bump${setup.fakeBellies.includes(slave.bellyAccessory) ? `, even though ${hers} isn't real` : ``}.`); + if (isPreg(slave) || App.Data.misc.fakeBellies.includes(slave.bellyAccessory)) { + r.push(`${His} viewers <span class="reputation inc">approve</span> of the fact that ${he} is sporting a baby bump${App.Data.misc.fakeBellies.includes(slave.bellyAccessory) ? `, even though ${hers} isn't real` : ``}.`); } else { r.push(`${His} viewers <span class="reputation dec">are disappointed</span> that ${he} isn't pregnant.`); } diff --git a/src/facilities/nursery/utils/nurseryUtils.js b/src/facilities/nursery/utils/nurseryUtils.js index b31bcfe02d5..5fe770d000f 100644 --- a/src/facilities/nursery/utils/nurseryUtils.js +++ b/src/facilities/nursery/utils/nurseryUtils.js @@ -420,7 +420,7 @@ App.Facilities.Nursery.nameChild = function nameChild(child) { r += `<br> <<link "Have your PA assign ${him} a random cow name">> <<replace "#naming">>`; - child.slaveName = setup.cowSlaveNames.random(); + child.slaveName = App.Data.misc.cowSlaveNames.random(); child.birthName = child.slaveName; r += `${V.assistant.name} registers the new ${girl} as "${child.slaveName}" in your registry. <</replace>> @@ -431,7 +431,7 @@ App.Facilities.Nursery.nameChild = function nameChild(child) { r += `<br> <<link "Have your PA assign ${him} a random devotional name">> <<replace "#naming">>`; - child.slaveName = setup.chattelReligionistSlaveNames.random(); + child.slaveName = App.Data.misc.chattelReligionistSlaveNames.random(); child.birthName = child.slaveName; r += `${V.assistant.name} registers the new ${girl} as "${child.slaveName}" in your registry. <</replace>> @@ -441,7 +441,7 @@ App.Facilities.Nursery.nameChild = function nameChild(child) { r += `<br> <<link "Have your PA assign ${him} a random Roman name">> <<replace "#naming">>`; - child.slaveName = setup.romanSlaveNames.random(); + child.slaveName = App.Data.misc.romanSlaveNames.random(); child.birthName = child.slaveName; r += `${V.assistant.name} registers the new ${girl} as "${child.slaveName}" in your registry. <</replace>> @@ -450,7 +450,7 @@ App.Facilities.Nursery.nameChild = function nameChild(child) { r += `<br> <<link "Have your PA assign ${him} a random Aztec name">> <<replace "#naming">>`; - child.slaveName = setup.aztecSlaveNames.random(); + child.slaveName = App.Data.misc.aztecSlaveNames.random(); child.birthName = child.slaveName; r += `${V.assistant.name} registers the new ${girl} as "${child.slaveName}" in your registry. <</replace>> @@ -459,7 +459,7 @@ App.Facilities.Nursery.nameChild = function nameChild(child) { r += `<br> <<link "Have your PA assign ${him} a random ancient Egyptian name">> <<replace "#naming">>`; - child.slaveName = setup.ancientEgyptianSlaveNames.random(); + child.slaveName = App.Data.misc.ancientEgyptianSlaveNames.random(); child.birthName = child.slaveName; r += `${V.assistant.name} registers the new ${girl} as "${child.slaveName}" in your registry. <</replace>> @@ -468,7 +468,7 @@ App.Facilities.Nursery.nameChild = function nameChild(child) { r += `<br> <<link "Have your PA assign ${him} a random feudal Japanese name">> <<replace "#naming">>`; - child.slaveName = setup.edoSlaveNames.random(); + child.slaveName = App.Data.misc.edoSlaveNames.random(); child.birthName = child.slaveName; r += `${V.assistant.name} registers the new ${girl} as "${child.slaveName}" in your registry. <</replace>> diff --git a/src/facilities/surgery/surgeryPassageExotic.js b/src/facilities/surgery/surgeryPassageExotic.js index 8785fc89172..d35d7da0bd8 100644 --- a/src/facilities/surgery/surgeryPassageExotic.js +++ b/src/facilities/surgery/surgeryPassageExotic.js @@ -34,7 +34,7 @@ App.UI.surgeryPassageExotic = function(slave, cheat = false) { if (slave.indentureRestrictions > 1) { App.UI.DOM.appendNewElement("div", el, `${His} indenture forbids elective surgery`, ["choices", "note"]); } else { - for (const [race, capRace] of setup.filterRaces) { + for (const [race, capRace] of App.Data.misc.filterRaces) { if (slave.race === race) { continue; } diff --git a/src/interaction/rename.js b/src/interaction/rename.js index 98609deb9df..3345ce137c4 100644 --- a/src/interaction/rename.js +++ b/src/interaction/rename.js @@ -60,12 +60,12 @@ App.UI.SlaveInteract.rename = function(slave, {oldName = "", oldSurname = ""} = let toSearch; if (oldName !== slave.slaveName && typeof slave.slaveName === "string") { toSearch = slave.slaveName.toLowerCase(); - insultingName = setup.badWords.some((s) => toSearch.includes(s)); + insultingName = App.Data.misc.badWords.some((s) => toSearch.includes(s)); } if (!insultingName) { if (oldSurname !== slave.slaveSurname && typeof slave.slaveSurname === "string") { toSearch = slave.slaveSurname.toLowerCase(); - insultingName = setup.badWords.some((s) => toSearch.includes(s)); + insultingName = App.Data.misc.badWords.some((s) => toSearch.includes(s)); } } if (insultingName) { diff --git a/src/interaction/siCustom.js b/src/interaction/siCustom.js index a88ae05e48f..50c1c7be46a 100644 --- a/src/interaction/siCustom.js +++ b/src/interaction/siCustom.js @@ -184,16 +184,16 @@ App.UI.SlaveInteract.custom = function(slave) { if (V.arcologies[0].FSPastoralist !== "unset") { if (slave.lactation > 0) { - linkArray.push(chooseThreeNames(`Choose a random cow name for ${him}`, setup.cowSlaveNames, "cow-names")); + linkArray.push(chooseThreeNames(`Choose a random cow name for ${him}`, App.Data.misc.cowSlaveNames, "cow-names")); } } if (V.arcologies[0].FSIntellectualDependency !== "unset") { if (slave.intelligence + slave.intelligenceImplant < -10) { - linkArray.push(chooseThreeNames(`Give ${him} a random stripper given name`, setup.bimboSlaveNames, "bimbo-names")); + linkArray.push(chooseThreeNames(`Give ${him} a random stripper given name`, App.Data.misc.bimboSlaveNames, "bimbo-names")); } } if (V.arcologies[0].FSChattelReligionist !== "unset") { - linkArray.push(chooseThreeNames(`Give ${him} a random devotional given name`, setup.chattelReligionistSlaveNames, "devotional-names")); + linkArray.push(chooseThreeNames(`Give ${him} a random devotional given name`, App.Data.misc.chattelReligionistSlaveNames, "devotional-names")); } result.append(App.UI.DOM.generateLinksStrip(linkArray)); slaveNameNode.appendChild(result); @@ -341,8 +341,8 @@ App.UI.SlaveInteract.custom = function(slave) { App.UI.DOM.link( `Give ${him} a random full Roman name`, () => { - slave.slaveName = setup.romanSlaveNames.random(); - slave.slaveSurname = setup.romanSlaveSurnames.random(); + slave.slaveName = App.Data.misc.romanSlaveNames.random(); + slave.slaveSurname = App.Data.misc.romanSlaveSurnames.random(); updateName(slave, {oldName: oldName, oldSurname: oldSurname}); } ) @@ -352,7 +352,7 @@ App.UI.SlaveInteract.custom = function(slave) { App.UI.DOM.link( `Give ${him} a random full Aztec name`, () => { - slave.slaveName = setup.aztecSlaveNames.random(); + slave.slaveName = App.Data.misc.aztecSlaveNames.random(); slave.slaveSurname = 0; updateName(slave, {oldName: oldName, oldSurname: oldSurname}); } @@ -363,7 +363,7 @@ App.UI.SlaveInteract.custom = function(slave) { App.UI.DOM.link( `Give ${him} a random full ancient Egyptian name`, () => { - slave.slaveName = setup.ancientEgyptianSlaveNames.random(); + slave.slaveName = App.Data.misc.ancientEgyptianSlaveNames.random(); slave.slaveSurname = 0; updateName(slave, {oldName: oldName, oldSurname: oldSurname}); } @@ -374,8 +374,8 @@ App.UI.SlaveInteract.custom = function(slave) { App.UI.DOM.link( `Give ${him} a random full feudal Japanese name`, () => { - slave.slaveName = setup.edoSlaveNames.random(); - slave.slaveSurname = setup.edoSlaveSurnames.random(); + slave.slaveName = App.Data.misc.edoSlaveNames.random(); + slave.slaveSurname = App.Data.misc.edoSlaveSurnames.random(); updateName(slave, {oldName: oldName, oldSurname: oldSurname}); } ) diff --git a/src/interaction/siRules.js b/src/interaction/siRules.js index df2c601aa61..a9cf7b061f6 100644 --- a/src/interaction/siRules.js +++ b/src/interaction/siRules.js @@ -115,7 +115,7 @@ App.UI.SlaveInteract.rules = function(slave) { penthouseCensus(); p.append("Living standard: "); - if (setup.facilityCareers.includes(slave.assignment)) { + if (App.Data.misc.facilityCareers.includes(slave.assignment)) { App.UI.DOM.appendNewElement("span", p, ` ${His} living conditions are managed by ${his} assignment.`, "note"); } else if ((slave.assignment === "be your Head Girl") && (V.HGSuite === 1)) { App.UI.DOM.appendNewElement("span", p, ` ${He} has ${his} own little luxurious room in the penthouse with everything ${he} needs to be a proper Head Girl.`, "note"); diff --git a/src/js/DefaultRules.js b/src/js/DefaultRules.js index b2332f8c535..dda5938b36c 100644 --- a/src/js/DefaultRules.js +++ b/src/js/DefaultRules.js @@ -769,7 +769,7 @@ globalThis.DefaultRules = (function() { // apply belly accessories to slave if ((rule.bellyAccessory !== undefined) && (rule.bellyAccessory !== null)) { if (slave.bellyAccessory !== rule.bellyAccessory) { - if ((slave.belly >= 1500 || slave.weight >= 130) && setup.fakeBellies.includes(rule.bellyAccessory)) { + if ((slave.belly >= 1500 || slave.weight >= 130) && App.Data.misc.fakeBellies.includes(rule.bellyAccessory)) { r += `<br>${slave.slaveName}'s natural belly is too big to properly wear an empathy belly.`; slave.bellyAccessory = "none"; } else { @@ -1899,7 +1899,7 @@ globalThis.DefaultRules = (function() { */ function ProcessLivingStandard(slave, rule) { if (rule.livingRules !== undefined && rule.livingRules !== null && slave.rules.living !== rule.livingRules) { - if (setup.facilityCareers.includes(slave.assignment)) { + if (App.Data.misc.facilityCareers.includes(slave.assignment)) { // Handled in Rules tab of SI now. // r += `<br>${slave.slaveName}'s living standards are controlled by ${his} assignment.`; } else if (((slave.assignment === Job.HEADGIRL) && (V.HGSuite === 1)) || ((slave.assignment === Job.BODYGUARD) && (V.dojo > 1))) { diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js index e29a96b2d19..9b85122e9bb 100644 --- a/src/js/rulesAssistantOptions.js +++ b/src/js/rulesAssistantOptions.js @@ -2454,7 +2454,7 @@ App.RA.options = (function() { if (V.pregnancyMonitoringUpgrade === 1 && V.geneticMappingUpgrade >= 1) { pairs.push(["boys", "male"]); pairs.push(["girls", "female"]); - for (const [race, capRace] of setup.filterRaces) { + for (const [race, capRace] of App.Data.misc.filterRaces) { pairs.push([capRace, "race:" + race]); } } diff --git a/src/js/slaveSummaryWidgets.js b/src/js/slaveSummaryWidgets.js index 845adfab187..5d3b69f6b7c 100644 --- a/src/js/slaveSummaryWidgets.js +++ b/src/js/slaveSummaryWidgets.js @@ -708,7 +708,7 @@ App.UI.SlaveSummaryRenderers = function() { * @returns {void} */ race: function(slave, c) { - const raceStr = setup.filterRaces.get(slave.race) || capFirstChar(slave.race); + const raceStr = App.Data.misc.filterRaces.get(slave.race) || capFirstChar(slave.race); helpers.makeSpan(c, raceStr + '.', "tan"); }, diff --git a/src/js/statsChecker/statsChecker.js b/src/js/statsChecker/statsChecker.js index 59ba470fc0b..5003e26c3d1 100644 --- a/src/js/statsChecker/statsChecker.js +++ b/src/js/statsChecker/statsChecker.js @@ -487,7 +487,7 @@ globalThis.isPreg = function(slave) { * @returns {boolean} */ globalThis.isNotPreg = function(slave) { - return (!isPreg(slave) && (slave.belly < 100) && (slave.weight < 30) && !setup.fakeBellies.includes(slave.bellyAccessory)); + return (!isPreg(slave) && (slave.belly < 100) && (slave.weight < 30) && !App.Data.misc.fakeBellies.includes(slave.bellyAccessory)); }; /** diff --git a/src/js/utilsMisc.js b/src/js/utilsMisc.js index d25cce3b183..5cf61724876 100644 --- a/src/js/utilsMisc.js +++ b/src/js/utilsMisc.js @@ -116,5 +116,5 @@ App.Utils.removeArticles = function(str) { * @returns {Array<FC.Race>} */ App.Utils.getRaceArrayWithoutParamRace = function(badRace) { - return Array.from(setup.filterRaces.keys()).filter(race => race !== badRace); + return Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== badRace); }; diff --git a/src/js/wombJS.js b/src/js/wombJS.js index 5374dc38709..8518632cd4f 100644 --- a/src/js/wombJS.js +++ b/src/js/wombJS.js @@ -47,7 +47,7 @@ globalThis.WombInit = function(actor) { } if (actor.pregData === undefined) { - actor.pregData = clone(setup.pregData.human); + actor.pregData = clone(App.Data.misc.pregData.human); // Setup should be through deep copy, so in future, if we like, these values can be changed individually. Gameplay expansion possibilities. But for dev time to simplify debugging: // actor.pregData = setup.pregData.human; // any changes in setup pregData template will be applied immediately to all. But can't be made separate changes. } diff --git a/src/markets/specificMarkets/customSlaveMarket.js b/src/markets/specificMarkets/customSlaveMarket.js index fbc7d09ce9e..99ca66c95cb 100644 --- a/src/markets/specificMarkets/customSlaveMarket.js +++ b/src/markets/specificMarkets/customSlaveMarket.js @@ -301,7 +301,7 @@ App.Markets["Custom Slave"] = function() { const choices = new Map([ ["ethnicity is unimportant", "Ethnicity is unimportant"], ]); - for (const [race, capRace] of setup.filterRaces) { + for (const [race, capRace] of App.Data.misc.filterRaces) { choices.set(race, capRace); } @@ -948,7 +948,7 @@ App.Markets["Custom Slave"] = function() { ["Stateless", "Stateless"], ["Nationality is unimportant", "Nationality is unimportant"], ]); - for (const nationality of setup.baseNationalities) { + for (const nationality of App.Data.misc.baseNationalities) { choices.set(nationality, nationality); } diff --git a/src/markets/specificMarkets/huskSlave.js b/src/markets/specificMarkets/huskSlave.js index 5e0ef6a0268..e7b4d985c54 100644 --- a/src/markets/specificMarkets/huskSlave.js +++ b/src/markets/specificMarkets/huskSlave.js @@ -98,9 +98,9 @@ App.Markets["Husk Slave"] = function() { ); const linkArray = []; - const race = new Map(setup.filterRaces); + const race = new Map(App.Data.misc.filterRaces); race.set("not important", "Not Important"); - for (const [race, capRace] of setup.filterRaces) { + for (const [race, capRace] of App.Data.misc.filterRaces) { if (V.huskSlave.race === race) { linkArray.push( App.UI.DOM.disabledLink( diff --git a/src/npc/descriptions/belly/belly.js b/src/npc/descriptions/belly/belly.js index 1ced8651b4c..32330b645a7 100644 --- a/src/npc/descriptions/belly/belly.js +++ b/src/npc/descriptions/belly/belly.js @@ -13964,7 +13964,7 @@ App.Desc.belly = function(slave, {market, eventDescription} = {}) { function marksAndMods() { const r = []; if (slave.fuckdoll === 0) { - if (setup.fakeBellies.includes(slave.bellyAccessory)) { + if (App.Data.misc.fakeBellies.includes(slave.bellyAccessory)) { switch (slave.bellyAccessory) { case "a huge empathy belly": r.push(`${He} is wearing a carefully sculpted silicone belly modeled after a full-term pregnant woman carrying twins.`); diff --git a/src/npc/descriptions/crotch/crotch.js b/src/npc/descriptions/crotch/crotch.js index df6ea16b6d8..d2b904d7abb 100644 --- a/src/npc/descriptions/crotch/crotch.js +++ b/src/npc/descriptions/crotch/crotch.js @@ -1356,7 +1356,7 @@ App.Desc.crotch = function(slave, {market, eventDescription} = {}) { break; case "a chattel habit": r.push(`The strip of cloth running down ${his} front`); - if (setup.fakeBellies.includes(slave.bellyAccessory) || slave.weight > 95 || slave.belly >= 5000) { + if (App.Data.misc.fakeBellies.includes(slave.bellyAccessory) || slave.weight > 95 || slave.belly >= 5000) { r.push(`comes with a clip to fasten it to the underside of ${his} belly and`); } if (slave.dick > 0 && canAchieveErection(slave)) { diff --git a/src/npc/descriptions/describeBrands.js b/src/npc/descriptions/describeBrands.js index 74d9fe596d0..26527717b96 100644 --- a/src/npc/descriptions/describeBrands.js +++ b/src/npc/descriptions/describeBrands.js @@ -26,7 +26,7 @@ App.Desc.brand = function(slave, surface) { } r += `${arrayToSentence(array)}. `; } else if (surface) { /* describes a single branded body part */ - if (surface === "belly" && setup.fakeBellies.includes(slave.bellyAccessory) && slave.brand.belly) { + if (surface === "belly" && App.Data.misc.fakeBellies.includes(slave.bellyAccessory) && slave.brand.belly) { r += `${His} fake belly has the same brand, ${slave.brand.belly}, as ${his} real one. `; } else { const description = desc(surface); diff --git a/src/npc/descriptions/describePiercings.js b/src/npc/descriptions/describePiercings.js index cbc1985d22c..660bbc4c870 100644 --- a/src/npc/descriptions/describePiercings.js +++ b/src/npc/descriptions/describePiercings.js @@ -344,7 +344,7 @@ App.Desc.piercing = function(slave, surface) { } case "navel": { if (slave.fuckdoll === 0) { - if (setup.fakeBellies.includes(slave.bellyAccessory)) { + if (App.Data.misc.fakeBellies.includes(slave.bellyAccessory)) { if (slave.navelPiercing === 1) { r.push(`${His} fake navel bears a simple stud.`); } else if (slave.navelPiercing === 2) { diff --git a/src/npc/descriptions/describeScars.js b/src/npc/descriptions/describeScars.js index 29e032ca2da..4d9aa253286 100644 --- a/src/npc/descriptions/describeScars.js +++ b/src/npc/descriptions/describeScars.js @@ -71,7 +71,7 @@ App.Desc.scar = function(slave, surface) { } } else if (surface) { /* describes a single scarred body part */ surface = App.Desc.oppositeSides(surface); - if (surface.center === "belly" && setup.fakeBellies.includes(bellyAccessory) && slave.scar.hasOwnProperty("belly")) { + if (surface.center === "belly" && App.Data.misc.fakeBellies.includes(bellyAccessory) && slave.scar.hasOwnProperty("belly")) { r += `${His} fake belly has the same scar, ${App.Desc.expandScarString(slave, surface.center)}, as ${his} real one. `; } else { if (slave.scar[surface.center]) { // center defined, body part has no mirror. @@ -102,7 +102,7 @@ App.Desc.scar = function(slave, surface) { if (r === ``) { r += `${He} has `; } - if (key === "belly" && setup.fakeBellies.includes(bellyAccessory) && slave.scar.hasOwnProperty("belly")) { + if (key === "belly" && App.Data.misc.fakeBellies.includes(bellyAccessory) && slave.scar.hasOwnProperty("belly")) { r += `${value} scared on both ${his} real belly and ${his} fake one, `; } else { r += `${value} on ${his} ${key}, `; diff --git a/src/npc/descriptions/mouth.js b/src/npc/descriptions/mouth.js index 41f0efc530c..1ffcd736089 100644 --- a/src/npc/descriptions/mouth.js +++ b/src/npc/descriptions/mouth.js @@ -60,7 +60,7 @@ App.Desc.mouth = function(slave) { const writtenTitle = getWrittenTitle(slave); r.push(`${He} can barely enunciate past ${his} dick-sucking lips;`); if (title === writtenTitle) { - if (setup.badNames.includes(capFirstChar(writtenTitle))) { + if (App.Data.misc.badNames.includes(capFirstChar(writtenTitle))) { r.push(`unfortunately`); } else { r.push(`fortunately`); diff --git a/src/npc/generate/generateMarketSlave.js b/src/npc/generate/generateMarketSlave.js index 945b9f4c5d5..b538cc9bd2c 100644 --- a/src/npc/generate/generateMarketSlave.js +++ b/src/npc/generate/generateMarketSlave.js @@ -739,7 +739,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 } if (neighbor.FSIntellectualDependency > 20) { r += `The only thing that rivals their idiocy is their uncontrollable libido. `; - slave.slaveName = setup.bimboSlaveNames.random(); + slave.slaveName = App.Data.misc.bimboSlaveNames.random(); if (slave.intelligence > -50) { slave.intelligence = Intelligence.random({limitIntelligence: [-100, -50]}); } @@ -1004,7 +1004,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 } if (neighbor.FSChattelReligionist > 20) { r += `They're rarely anything but devoted, and sometimes present interesting peccadilloes. `; - slave.slaveName = setup.chattelReligionistSlaveNames.random(); + slave.slaveName = App.Data.misc.chattelReligionistSlaveNames.random(); if (slave.devotion < 10) { slave.devotion += jsRandom(0, 10); } @@ -1023,7 +1023,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 r += `seen`; } r += ` things that drive any squeamishness out of them. `; - slave.slaveName = setup.romanSlaveNames.random(); + slave.slaveName = App.Data.misc.romanSlaveNames.random(); if (jsRandom(0, 1) === 0) { slave.sexualQuirk = "unflinching"; } @@ -1034,7 +1034,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 } else { r += ". "; } - slave.slaveName = setup.aztecSlaveNames.random(); + slave.slaveName = App.Data.misc.aztecSlaveNames.random(); if (jsRandom(0, 1) === 0) { slave.trust = -30; } @@ -1045,13 +1045,13 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 } } else if (neighbor.FSEgyptianRevivalist > 20) { r += `They've often done things that give them a distinct appetite for perversion. `; - slave.slaveName = setup.ancientEgyptianSlaveNames.random(); + slave.slaveName = App.Data.misc.ancientEgyptianSlaveNames.random(); if (jsRandom(0, 1) === 0) { slave.sexualQuirk = "perverted"; } } else if (neighbor.FSEdoRevivalist > 20) { r += `They have frequently absorbed much culture there. `; - slave.slaveName = setup.edoSlaveNames.random(); + slave.slaveName = App.Data.misc.edoSlaveNames.random(); slave.skill.entertainment = Math.clamp(slave.skill.entertainment, 35, 100); } else if (neighbor.FSArabianRevivalist > 20) { r += `They've often been part of large harems in which selflessness is prized. `; @@ -1823,7 +1823,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave = GenerateNewSlave("XX", SGProp); slave.origin = "You bought $him from The Cattle Ranch."; slave.career = "a dairy slave"; - slave.slaveName = setup.cowSlaveNames.random(); + slave.slaveName = App.Data.misc.cowSlaveNames.random(); slave.slaveSurname = 0; slave.butt = jsEither([2, 2, 3, 3, 3, 4, 4]); slave.boobs = ((slave.physicalAge*100)*2)+jsEither([-100, -100, 0, 0, 100, 100, 200, 200, 300, 500]); @@ -1862,7 +1862,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 SGProp.ageOverridesPedoMode = 1; SGProp.disableDisability = 1; slave = GenerateNewSlave("XY", SGProp); - slave.slaveName = setup.cowSlaveNames.random(); + slave.slaveName = App.Data.misc.cowSlaveNames.random(); slave.slaveSurname = 0; slave.origin = "You bought $him from The Cattle Ranch."; slave.career = "a breeding bull"; @@ -1908,7 +1908,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 SGProp.ageOverridesPedoMode = 1; SGProp.disableDisability = 1; slave = GenerateNewSlave("XX", SGProp); - slave.slaveName = setup.cowSlaveNames.random(); + slave.slaveName = App.Data.misc.cowSlaveNames.random(); slave.slaveSurname = 0; slave.origin = "You bought $him from The Cattle Ranch."; slave.career = "a dairy cow"; @@ -2342,7 +2342,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave = GenerateNewSlave("XY", SGProp); } - const criminal = setup.gangCriminalPool.random(); + const criminal = App.Data.misc.gangCriminalPool.random(); switch (criminal) { case "mule": { @@ -2590,7 +2590,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 SGProp.disableDisability = 1; slave = GenerateNewSlave(null, SGProp); - const criminal = setup.militaryCriminalPool.random(); + const criminal = App.Data.misc.militaryCriminalPool.random(); switch (criminal) { case "spy": { @@ -2781,7 +2781,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 SGProp.disableDisability = 1; slave = GenerateNewSlave(null, SGProp); - const criminal = setup.whiteCollarCriminalPool.random(); + const criminal = App.Data.misc.whiteCollarCriminalPool.random(); switch (criminal) { case "racketeering": { @@ -2897,7 +2897,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 SGProp.disableDisability = 1; slave = GenerateNewSlave(null, SGProp); - const criminal = setup.pettyCriminalPool.random(); + const criminal = App.Data.misc.pettyCriminalPool.random(); switch (criminal) { case "robbery": { diff --git a/src/npc/generate/generateNewSlaveJS.js b/src/npc/generate/generateNewSlaveJS.js index 8210cb6adef..6ececdc27df 100644 --- a/src/npc/generate/generateNewSlaveJS.js +++ b/src/npc/generate/generateNewSlaveJS.js @@ -53,7 +53,7 @@ globalThis.GenerateNewSlave = (function() { } else { x.race = 0; } - } else if (x.race !== 0 && !(setup.filterRaces.has(x.race))) { + } else if (x.race !== 0 && !(App.Data.misc.filterRaces.has(x.race))) { console.log("Error, cannot find race: ", x.race); x.race = 0; } diff --git a/src/npc/generate/heroCreator.js b/src/npc/generate/heroCreator.js index 171d67ce0bd..ab37ce4457a 100644 --- a/src/npc/generate/heroCreator.js +++ b/src/npc/generate/heroCreator.js @@ -68,24 +68,24 @@ App.Utils.getHeroSlave = function(heroSlave) { // Nationalities, races, surnames random fill if (!heroSlave.nationality) { // Check for a pre-set race and if the nationality fits, else regenerate - if (heroSlave.race && setup.filterRaces.has(heroSlave.race)) { + if (heroSlave.race && App.Data.misc.filterRaces.has(heroSlave.race)) { raceToNationality(heroSlave); } else { heroSlave.nationality = hashChoice(V.nationalities); } } - if (!heroSlave.race || !setup.filterRaces.has(heroSlave.race)) { + if (!heroSlave.race || !App.Data.misc.filterRaces.has(heroSlave.race)) { nationalityToRace(heroSlave); } if (!heroSlave.birthSurname && heroSlave.birthSurname !== "") { - heroSlave.birthSurname = (setup.surnamePoolSelector[heroSlave.nationality + "." + heroSlave.race] || - setup.surnamePoolSelector[heroSlave.nationality] || - setup.whiteAmericanSlaveSurnames).random(); + heroSlave.birthSurname = (App.Data.misc.surnamePoolSelector[heroSlave.nationality + "." + heroSlave.race] || + App.Data.misc.surnamePoolSelector[heroSlave.nationality] || + App.Data.misc.whiteAmericanSlaveSurnames).random(); } if (!heroSlave.birthName && heroSlave.birthName !== "") { - heroSlave.birthName = (setup.namePoolSelector[heroSlave.nationality + "." + heroSlave.race] || - setup.namePoolSelector[heroSlave.nationality] || - setup.whiteAmericanSlaveNames).random(); + heroSlave.birthName = (App.Data.misc.namePoolSelector[heroSlave.nationality + "." + heroSlave.race] || + App.Data.misc.namePoolSelector[heroSlave.nationality] || + App.Data.misc.whiteAmericanSlaveNames).random(); } if (heroSlave.slaveName === -1) { heroSlave.slaveName = heroSlave.birthName; diff --git a/src/npc/generate/newChildIntro.js b/src/npc/generate/newChildIntro.js index 4c25206b346..52badecdc9b 100644 --- a/src/npc/generate/newChildIntro.js +++ b/src/npc/generate/newChildIntro.js @@ -88,7 +88,7 @@ App.UI.newChildIntro = function(slave) { App.UI.DOM.link( `Have your PA assign ${him} a random cow name`, () => { - slave.slaveName = setup.cowSlaveNames.random(); + slave.slaveName = App.Data.misc.cowSlaveNames.random(); slave.birthName = slave.slaveName; jQuery("#naming").empty().append(`${V.assistant.name} registers the new ${girl} as "${slave.slaveName}" in your registry.`); const slaveName = document.createElement("span"); @@ -106,7 +106,7 @@ App.UI.newChildIntro = function(slave) { App.UI.DOM.link( `Have your PA assign ${him} a random stripper name`, () => { - slave.slaveName = setup.bimboSlaveNames.random(); + slave.slaveName = App.Data.misc.bimboSlaveNames.random(); slave.birthName = slave.slaveName; jQuery("#naming").empty().append(`${V.assistant.name} registers the new ${girl} as "${slave.slaveName}" in your registry.`); const slaveName = document.createElement("span"); @@ -124,7 +124,7 @@ App.UI.newChildIntro = function(slave) { App.UI.DOM.link( `Have your PA assign ${him} a random devotional name`, () => { - slave.slaveName = setup.chattelReligionistSlaveNames.random(); + slave.slaveName = App.Data.misc.chattelReligionistSlaveNames.random(); slave.birthName = slave.slaveName; jQuery("#naming").empty().append(`${V.assistant.name} registers the new ${girl} as "${slave.slaveName}" in your registry.`); const slaveName = document.createElement("span"); @@ -142,7 +142,7 @@ App.UI.newChildIntro = function(slave) { App.UI.DOM.link( `Have your PA assign ${him} a random Roman name`, () => { - slave.slaveName = setup.romanSlaveNames.random(); + slave.slaveName = App.Data.misc.romanSlaveNames.random(); slave.birthName = slave.slaveName; jQuery("#naming").empty().append(`${V.assistant.name} registers the new ${girl} as "${slave.slaveName}" in your registry.`); const slaveName = document.createElement("span"); @@ -159,7 +159,7 @@ App.UI.newChildIntro = function(slave) { App.UI.DOM.link( `Have your PA assign ${him} a random Aztec name`, () => { - slave.slaveName = setup.aztecSlaveNames.random(); + slave.slaveName = App.Data.misc.aztecSlaveNames.random(); slave.birthName = slave.slaveName; jQuery("#naming").empty().append(`${V.assistant.name} registers the new ${girl} as "${slave.slaveName}" in your registry.`); const slaveName = document.createElement("span"); @@ -176,7 +176,7 @@ App.UI.newChildIntro = function(slave) { App.UI.DOM.link( `Have your PA assign ${him} a random Egyptian name`, () => { - slave.slaveName = setup.ancientEgyptianSlaveNames.random(); + slave.slaveName = App.Data.misc.ancientEgyptianSlaveNames.random(); slave.birthName = slave.slaveName; jQuery("#naming").empty().append(`${V.assistant.name} registers the new ${girl} as "${slave.slaveName}" in your registry.`); const slaveName = document.createElement("span"); @@ -193,7 +193,7 @@ App.UI.newChildIntro = function(slave) { App.UI.DOM.link( `Have your PA assign ${him} a random feudal Japanese name`, () => { - slave.slaveName = setup.edoSlaveNames.random(); + slave.slaveName = App.Data.misc.edoSlaveNames.random(); slave.birthName = slave.slaveName; jQuery("#naming").empty().append(`${V.assistant.name} registers the new ${girl} as "${slave.slaveName}" in your registry.`); const slaveName = document.createElement("span"); diff --git a/src/npc/generate/newSlaveIntro.js b/src/npc/generate/newSlaveIntro.js index acf5cb05f55..8a222670a66 100644 --- a/src/npc/generate/newSlaveIntro.js +++ b/src/npc/generate/newSlaveIntro.js @@ -822,7 +822,7 @@ App.UI.newSlaveIntro = function(slave, slave2, {tankBorn = false, momInterest = if (slave.devotion < -50 && slave.rudeTitle !== 1) { if (jsRandom(-100, 0) >= slave.devotion) { slave.rudeTitle = 1; - slave.custom.title = setup.badNames.random(); + slave.custom.title = App.Data.misc.badNames.random(); slave.custom.titleLisp = lispReplace(slave.custom.title); } } diff --git a/src/npc/generate/slaveGenerationJS.js b/src/npc/generate/slaveGenerationJS.js index 9f7e466bc3e..4ccb3e962b4 100644 --- a/src/npc/generate/slaveGenerationJS.js +++ b/src/npc/generate/slaveGenerationJS.js @@ -2,7 +2,7 @@ * @param {App.Entity.SlaveState} slave */ globalThis.nationalityToRace = function(slave) { - slave.race = hashChoice(setup.raceSelector[slave.nationality] || setup.raceSelector[""]); + slave.race = hashChoice(App.Data.misc.raceSelector[slave.nationality] || App.Data.misc.raceSelector[""]); }; /** @@ -13,13 +13,13 @@ globalThis.raceToNationality = function(slave) { slave.nationality = hashChoice(V.nationalities); /* Maximum of 100 attempts */ let i = 0; - for (; setup.raceSelector[slave.nationality] && !(slave.race in setup.raceSelector[slave.nationality]) && i < 100; i++) { + for (; App.Data.misc.raceSelector[slave.nationality] && !(slave.race in App.Data.misc.raceSelector[slave.nationality]) && i < 100; i++) { slave.nationality = hashChoice(V.nationalities); } /* No success after 100 attempts, so just randomize according to race */ - if (setup.raceSelector[slave.nationality] && !(slave.race in setup.raceSelector[slave.nationality]) && i === 100) { - if (slave.race in setup.nationalitiesByRace) { - slave.nationality = hashChoice(setup.nationalitiesByRace[slave.race]); + if (App.Data.misc.raceSelector[slave.nationality] && !(slave.race in App.Data.misc.raceSelector[slave.nationality]) && i === 100) { + if (slave.race in App.Data.misc.nationalitiesByRace) { + slave.nationality = hashChoice(App.Data.misc.nationalitiesByRace[slave.race]); } else { slave.nationality = "Stateless"; } @@ -34,10 +34,10 @@ globalThis.raceToNationality = function(slave) { * @returns {string} */ globalThis.generateName = function(nationality, race, male, filter = _.stubTrue) { - const lookup = (male ? setup.malenamePoolSelector : setup.namePoolSelector); + const lookup = (male ? App.Data.misc.malenamePoolSelector : App.Data.misc.namePoolSelector); const result = jsEither( (lookup[`${nationality}.${race}`] || lookup[nationality] || - (male ? setup.whiteAmericanMaleNames : setup.whiteAmericanSlaveNames)).filter(filter)); + (male ? App.Data.misc.whiteAmericanMaleNames : App.Data.misc.whiteAmericanSlaveNames)).filter(filter)); /* fallback for males without specific male name sets: return female name */ if (male && !result) { return generateName(nationality, race, false); @@ -54,12 +54,12 @@ globalThis.generateName = function(nationality, race, male, filter = _.stubTrue) */ globalThis.generateSurname = function(nationality, race, male, filter = _.stubTrue) { const result = jsEither( - (setup.surnamePoolSelector[`${nationality}.${race}`] || - setup.surnamePoolSelector[nationality] || - setup.whiteAmericanSlaveSurnames).filter(filter)); + (App.Data.misc.surnamePoolSelector[`${nationality}.${race}`] || + App.Data.misc.surnamePoolSelector[nationality] || + App.Data.misc.whiteAmericanSlaveSurnames).filter(filter)); if (male) { /* see if we have male equivalent of that surname, and return that if so */ - const maleLookup = setup.maleSurnamePoolSelector[`${nationality}.${race}`] || setup.maleSurnamePoolSelector[nationality]; + const maleLookup = App.Data.misc.maleSurnamePoolSelector[`${nationality}.${race}`] || App.Data.misc.maleSurnamePoolSelector[nationality]; if (maleLookup && maleLookup[result]) { return maleLookup[result]; } @@ -74,9 +74,9 @@ globalThis.generateSurname = function(nationality, race, male, filter = _.stubTr * @returns {boolean} */ globalThis.isMaleName = function(name, nationality, race) { - const names = setup.malenamePoolSelector[`${nationality}.${race}`] || - setup.malenamePoolSelector[nationality] || - setup.whiteAmericanMaleNames; + const names = App.Data.misc.malenamePoolSelector[`${nationality}.${race}`] || + App.Data.misc.malenamePoolSelector[nationality] || + App.Data.misc.whiteAmericanMaleNames; return names && names.includes(name); }; @@ -97,44 +97,44 @@ globalThis.nationalityToName = function(slave) { if (V.useFSNames === 1) { if (V.FSNamePref === 0) { if (V.arcologies[0].FSChattelReligionist > 20) { - slave.slaveName = jsEither(setup.chattelReligionistSlaveNames); + slave.slaveName = jsEither(App.Data.misc.chattelReligionistSlaveNames); slave.slaveSurname = 0; } else if (V.arcologies[0].FSRomanRevivalist > 20) { - slave.slaveName = jsEither(setup.romanSlaveNames); - slave.slaveSurname = jsEither(setup.romanSlaveSurnames); + slave.slaveName = jsEither(App.Data.misc.romanSlaveNames); + slave.slaveSurname = jsEither(App.Data.misc.romanSlaveSurnames); } else if (V.arcologies[0].FSAztecRevivalist > 20) { - slave.slaveName = jsEither(setup.aztecSlaveNames); + slave.slaveName = jsEither(App.Data.misc.aztecSlaveNames); slave.slaveSurname = 0; } else if (V.arcologies[0].FSEgyptianRevivalist > 20) { - slave.slaveName = jsEither(setup.ancientEgyptianSlaveNames); + slave.slaveName = jsEither(App.Data.misc.ancientEgyptianSlaveNames); slave.slaveSurname = 0; } else if (V.arcologies[0].FSEdoRevivalist > 20) { - slave.slaveName = jsEither(setup.edoSlaveNames); - slave.slaveSurname = jsEither(setup.edoSlaveSurnames); + slave.slaveName = jsEither(App.Data.misc.edoSlaveNames); + slave.slaveSurname = jsEither(App.Data.misc.edoSlaveSurnames); } else if (V.arcologies[0].FSDegradationist !== "unset") { DegradingName(slave); } } else if (V.FSNamePref === 1) { - slave.slaveName = jsEither(setup.chattelReligionistSlaveNames); + slave.slaveName = jsEither(App.Data.misc.chattelReligionistSlaveNames); slave.slaveSurname = 0; } else if (V.FSNamePref === 2) { - slave.slaveName = jsEither(setup.romanSlaveNames); - slave.slaveSurname = jsEither(setup.romanSlaveSurnames); + slave.slaveName = jsEither(App.Data.misc.romanSlaveNames); + slave.slaveSurname = jsEither(App.Data.misc.romanSlaveSurnames); } else if (V.FSNamePref === 3) { - slave.slaveName = jsEither(setup.aztecSlaveNames); + slave.slaveName = jsEither(App.Data.misc.aztecSlaveNames); slave.slaveSurname = 0; } else if (V.FSNamePref === 4) { - slave.slaveName = jsEither(setup.ancientEgyptianSlaveNames); + slave.slaveName = jsEither(App.Data.misc.ancientEgyptianSlaveNames); slave.slaveSurname = 0; } else if (V.FSNamePref === 5) { - slave.slaveName = jsEither(setup.edoSlaveNames); - slave.slaveSurname = jsEither(setup.edoSlaveSurnames); + slave.slaveName = jsEither(App.Data.misc.edoSlaveNames); + slave.slaveSurname = jsEither(App.Data.misc.edoSlaveSurnames); } else if (V.FSNamePref === 6) { DegradingName(slave); } else if (V.FSNamePref === 7) { PaternalistName(slave); } else if (V.FSNamePref === 8) { - slave.slaveName = jsEither(setup.bimboSlaveNames); + slave.slaveName = jsEither(App.Data.misc.bimboSlaveNames); slave.slaveSurname = 0; } } diff --git a/src/npc/infants/infantSummary.js b/src/npc/infants/infantSummary.js index d4ff841ce96..1f56f377878 100644 --- a/src/npc/infants/infantSummary.js +++ b/src/npc/infants/infantSummary.js @@ -108,7 +108,7 @@ App.Facilities.Nursery.InfantSummary = function(child) { if (abbreviate.race === 1) { r += shortRace(); } else if (abbreviate.race === 2) { - r += setup.filterRaces.get(child.race) || `${child.race.charAt(0).toUpperCase() + child.race.slice(1)}. `; + r += App.Data.misc.filterRaces.get(child.race) || `${child.race.charAt(0).toUpperCase() + child.race.slice(1)}. `; } r += `</span> `; } diff --git a/src/npc/startingGirls/startingGirls.js b/src/npc/startingGirls/startingGirls.js index 03d7e780439..cd00a299ff6 100644 --- a/src/npc/startingGirls/startingGirls.js +++ b/src/npc/startingGirls/startingGirls.js @@ -1251,7 +1251,7 @@ App.StartingGirls.profile = function(slave, cheat = false) { if (V.seeRace === 1) { options.addOption(`${His} ethnicity is`, "race", slave).showTextBox().pulldown() - .addValueList(Array.from(setup.filterRaces, (k => [k[1], k[0]]))); + .addValueList(Array.from(App.Data.misc.filterRaces, (k => [k[1], k[0]]))); } el.append(options.render()); diff --git a/src/uncategorized/pRivalryCapture.js b/src/uncategorized/pRivalryCapture.js index 42ab402d3fb..9a766ec878c 100644 --- a/src/uncategorized/pRivalryCapture.js +++ b/src/uncategorized/pRivalryCapture.js @@ -103,7 +103,7 @@ globalThis.pRivalryCapture = function() { } rivalType = rivalTypeArray.random(); - if (V.rivalRace && setup.filterRaces.has(V.rivalRace)) { + if (V.rivalRace && App.Data.misc.filterRaces.has(V.rivalRace)) { race = V.rivalRace; } switch (rivalType) { -- GitLab