From 78efafe4cb3d22005fcefa0aaf80d17336b6d2b6 Mon Sep 17 00:00:00 2001 From: Pregmodder <pregmodder@gmail.com> Date: Thu, 1 Sep 2022 11:26:45 -0400 Subject: [PATCH] fixes + bc --- js/003-data/policiesData.js | 42 +++++++++---------- src/002-config/fc-version.js | 2 +- .../backwardsCompatibility.js | 3 ++ src/endWeek/player/prDiet.js | 4 +- src/endWeek/player/prHormones.js | 4 +- src/endWeek/player/prPregnancy.js | 2 +- src/endWeek/saDiet.js | 4 +- src/endWeek/saHormonesEffects.js | 4 +- src/endWeek/saPregnancy.js | 2 +- src/events/intro/initNationalities.js | 1 + src/futureSocieties/futureSociety.js | 5 +++ src/js/economyJS.js | 4 +- 12 files changed, 43 insertions(+), 34 deletions(-) diff --git a/js/003-data/policiesData.js b/js/003-data/policiesData.js index cb4d218c4ad..88c7ab163c7 100644 --- a/js/003-data/policiesData.js +++ b/js/003-data/policiesData.js @@ -1237,7 +1237,7 @@ App.Data.Policies.Selection = { V.seeDicks !== 0 && V.arcologies[0].FSGenderRadicalist > 60 && V.arcologies[0].FSSlimnessEnthusiastLaw === 0 && - V.arcologies[0].FSSlimnessFoodLaw === 0 && + V.arcologies[0].FSSlimnessEnthusiastFoodLaw === 0 && V.arcologies[0].FSGenderRadicalistLawFuta === 0 ); }, @@ -1583,26 +1583,26 @@ App.Data.Policies.Selection = { note: `Flat slaves will enjoy increased attractiveness to citizens` } ], + "arcologies[0].FSSlimnessEnthusiastFoodLaw": [ + { + title: "Asset Slimming Food", + titleClass: "lime", + text: "slave food production will be required to follow a recipe that keeps chattel nice and trim, reducing the growth of disgusting flesh on their T&A.", + activatedText: "you have standardized a slave food recipe to keep your chattel nice and trim, reducing the amount of oversized T&A in the arcology.", + get requirements() { + return ( + V.arcologies[0].FSGenderRadicalistLawBeauty === 0 && + V.arcologies[0].FSGenderFundamentalistLawBeauty === 0 && + V.arcologies[0].FSGenderRadicalistLawFuta !== 3 && + V.arcologies[0].FSHedonisticDecadenceLaw2 === 0 && + V.arcologies[0].FSPhysicalIdealistLaw === 0 && + V.arcologies[0].FSSlimnessEnthusiast > 20 + ); + }, + note: `Slaves will struggle to grow beyond the ideal amount of T&A. ` + } + ], }, - "arcologies[0].FSSlimnessFoodLaw": [ - { - title: "Asset Slimming Food", - titleClass: "lime", - text: "slave food production will be required to follow a recipe that keeps chattel nice and trim, reducing the growth of disgusting flesh on their T&A.", - activatedText: "you have standardized a slave food recipe to keep your chattel nice and trim, reducing the amount of oversized T&A in the arcology.", - get requirements() { - return ( - V.arcologies[0].FSGenderRadicalistLawBeauty === 0 && - V.arcologies[0].FSGenderFundamentalistLawBeauty === 0 && - V.arcologies[0].FSGenderRadicalistLawFuta !== 3 && - V.arcologies[0].FSHedonisticDecadenceLaw2 === 0 && - V.arcologies[0].FSPhysicalIdealistLaw === 0 && - V.arcologies[0].FSSlimnessEnthusiast > 20 - ); - }, - note: `Slaves will struggle to grow beyond the ideal amount of T&A. ` - } - ], FSAssetExpansionist: { "arcologies[0].FSAssetExpansionistSMR": [ { @@ -1713,7 +1713,7 @@ App.Data.Policies.Selection = { get requirements() { return ( V.arcologies[0].FSSlimnessEnthusiastLaw === 0 && - V.arcologies[0].FSSlimnessFoodLaw === 0 && + V.arcologies[0].FSSlimnessEnthusiastFoodLaw === 0 && V.arcologies[0].FSGenderRadicalistLawBeauty === 0 && V.arcologies[0].FSGenderFundamentalistLawBeauty === 0 && V.arcologies[0].FSPhysicalIdealistLaw === 0 && diff --git a/src/002-config/fc-version.js b/src/002-config/fc-version.js index 365517ed20f..ce3af0a67c1 100644 --- a/src/002-config/fc-version.js +++ b/src/002-config/fc-version.js @@ -2,5 +2,5 @@ App.Version = { base: "0.10.7.1", // The vanilla version the mod is based off of, this should never be changed. pmod: "4.0.0-alpha.19", commitHash: null, - release: 1178, // When getting close to 2000, please remove the check located within the onLoad() function defined at line five of src/js/eventHandlers.js. + release: 1179, // When getting close to 2000, please remove the check located within the onLoad() function defined at line five of src/js/eventHandlers.js. }; diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js index 2d86ff9fbff..2c1e4588b90 100644 --- a/src/data/backwardsCompatibility/backwardsCompatibility.js +++ b/src/data/backwardsCompatibility/backwardsCompatibility.js @@ -707,6 +707,9 @@ App.Update.globalVariables = function(node) { } else if (typeof V.arcologies[0].FSSlimnessEnthusiastSMR === "undefined") { V.arcologies[0].FSSlimnessEnthusiastSMR = 0; } + if (typeof V.arcologies[0].FSSlimnessEnthusiastFoodLaw === "undefined") { + V.arcologies[0].FSSlimnessEnthusiastFoodLaw = 0; + } if ((typeof V.FSMaturityPreferentialist !== "undefined") && V.FSMaturityPreferentialist !== "unset") { V.arcologies[0].FSMaturityPreferentialist = V.FSMaturityPreferentialist; } else if (typeof V.arcologies[0].FSMaturityPreferentialist === "undefined") { diff --git a/src/endWeek/player/prDiet.js b/src/endWeek/player/prDiet.js index 1cb3472e50f..2dbdb425779 100644 --- a/src/endWeek/player/prDiet.js +++ b/src/endWeek/player/prDiet.js @@ -827,7 +827,7 @@ App.EndWeek.Player.diet = function(PC = V.PC) { roll = 75; target = Math.trunc(Math.clamp(weightMod * 2 - (boobSize - growthGoal) / 20, 0, 68)); } - if (PC.geneMods.NCS === 1 || (V.arcologies[0].FSSlimnessFoodLaw === 1 && !canEatFood(PC))) { + if (PC.geneMods.NCS === 1 || (V.arcologies[0].FSSlimnessEnthusiastFoodLaw === 1 && !canEatFood(PC))) { roll *= 2; } // PC food is not laced with hormones normally, so galactorrhea is not triggered here. @@ -844,7 +844,7 @@ App.EndWeek.Player.diet = function(PC = V.PC) { roll = 80000; target = Math.trunc(Math.clamp(weightMod * 1000 - (buttSize * 1000 - growthGoal) * 4, 0, 72000)); } - if (PC.geneMods.NCS === 1 || (V.arcologies[0].FSSlimnessFoodLaw === 1 && !canEatFood(PC))) { + if (PC.geneMods.NCS === 1 || (V.arcologies[0].FSSlimnessEnthusiastFoodLaw === 1 && !canEatFood(PC))) { roll *= 2; } if (random(1, roll) <= target) { diff --git a/src/endWeek/player/prHormones.js b/src/endWeek/player/prHormones.js index 1dedc6f95fe..3092dc19603 100644 --- a/src/endWeek/player/prHormones.js +++ b/src/endWeek/player/prHormones.js @@ -122,8 +122,8 @@ App.EndWeek.Player.hormones = function(PC, selfManufactured, hormonePower) { function hormonesEffects() { if (Math.abs(PC.hormoneBalance) >= 50) { if (PC.hormoneBalance > 30 && PC.geneMods.NCS !== 1) { - const slimModBreasts = (V.arcologies[0].FSSlimnessFoodLaw === 1 && !canEatFood(PC)) ? 0.45 : 1; // 600 average breast target, 270 target, 475 @ 350 hormone - const slimModButts = (V.arcologies[0].FSSlimnessFoodLaw === 1 && !canEatFood(PC)) ? 0.6 : 1; // 2.5 average butt, 1.5 target + const slimModBreasts = (V.arcologies[0].FSSlimnessEnthusiastFoodLaw === 1 && !canEatFood(PC)) ? 0.45 : 1; // 600 average breast target, 270 target, 475 @ 350 hormone + const slimModButts = (V.arcologies[0].FSSlimnessEnthusiastFoodLaw === 1 && !canEatFood(PC)) ? 0.6 : 1; // 2.5 average butt, 1.5 target /* 'Expected' breast size based on weight for feminine-bodied player. Masculine-bodied takes a small hit. */ normBreasts = Math.trunc((100 + (PC.weight + 100) * 5 + 2 * PC.lactationAdaptation) * (0.85 + PC.hormoneBalance / 400) * gigantomastiaMod * slimModBreasts / Math.max(PC.title * 1.25, 1)); normButt = ((PC.weight + 100) * 0.025 * (0.9 + PC.hormoneBalance / 600) * (rearLipedemaMod / 2 + 1) * slimModButts / Math.max(PC.title * 1.10, 1)); diff --git a/src/endWeek/player/prPregnancy.js b/src/endWeek/player/prPregnancy.js index a3197867d82..b6c9cc27be5 100644 --- a/src/endWeek/player/prPregnancy.js +++ b/src/endWeek/player/prPregnancy.js @@ -269,7 +269,7 @@ App.EndWeek.Player.pregnancy = function(PC = V.PC) { function pregnancyPhysicalEffects() { let boobTarget; - const slimnessFoodMod = (V.arcologies[0].FSSlimnessFoodLaw === 1 && !canEatFood(PC)) ? 0.5 : 1; + const slimnessFoodMod = (V.arcologies[0].FSSlimnessEnthusiastFoodLaw === 1 && !canEatFood(PC)) ? 0.5 : 1; if (PC.geneMods.NCS === 1) { // NCS: always working against secondary sexual characteristics even in pregnancies. boobTarget = 0; diff --git a/src/endWeek/saDiet.js b/src/endWeek/saDiet.js index e3032f2ab03..17d12f2f5f0 100644 --- a/src/endWeek/saDiet.js +++ b/src/endWeek/saDiet.js @@ -1443,7 +1443,7 @@ App.SlaveAssignment.diet = function saDiet(slave) { roll = 75; target = Math.trunc(Math.clamp(weightGain * 2 - (boobSize - growthGoal) / 20, 0, 68)); } - if (slave.geneMods.NCS === 1 || V.arcologies[0].FSSlimnessFoodLaw === 1) { + if (slave.geneMods.NCS === 1 || V.arcologies[0].FSSlimnessEnthusiastFoodLaw === 1) { roll *= 2; } if (random(1, roll) <= target) { @@ -1464,7 +1464,7 @@ App.SlaveAssignment.diet = function saDiet(slave) { roll = 80000; target = Math.trunc(Math.clamp(weightGain * 1000 - (buttSize * 1000 - growthGoal) * 4, 0, 72000)); } - if (slave.geneMods.NCS === 1 || V.arcologies[0].FSSlimnessFoodLaw === 1) { + if (slave.geneMods.NCS === 1 || V.arcologies[0].FSSlimnessEnthusiastFoodLaw === 1) { roll *= 2; } if (random(1, roll) <= target) { diff --git a/src/endWeek/saHormonesEffects.js b/src/endWeek/saHormonesEffects.js index d573416597f..a054f79cb79 100644 --- a/src/endWeek/saHormonesEffects.js +++ b/src/endWeek/saHormonesEffects.js @@ -318,8 +318,8 @@ App.SlaveAssignment.hormonesEffects = function saHormonesEffects(slave) { let normBreasts = 0; let normButt = 0; if (slave.hormoneBalance > 30 && slave.geneMods.NCS !== 1) { - const slimModBreasts = (V.arcologies[0].FSSlimnessFoodLaw === 1) ? 0.45 : 1; // 600 average breast target, 270 target, 475 @ 350 hormone - const slimModButts = (V.arcologies[0].FSSlimnessFoodLaw === 1) ? 0.6 : 1; // 2.5 average butt, 1.5 target + const slimModBreasts = (V.arcologies[0].FSSlimnessEnthusiastFoodLaw === 1) ? 0.45 : 1; // 600 average breast target, 270 target, 475 @ 350 hormone + const slimModButts = (V.arcologies[0].FSSlimnessEnthusiastFoodLaw === 1) ? 0.6 : 1; // 2.5 average butt, 1.5 target /* 'Expected' breast size based on weight for feminine-bodied slaves */ normBreasts = Math.trunc((100 + (slave.weight + 100) * 5 + 2 * slave.lactationAdaptation) * (0.85 + slave.hormoneBalance / 400) * gigantomastiaMod * slimModBreasts); normButt = ((slave.weight + 100) * 0.025 * (0.9 + slave.hormoneBalance / 600) * (rearLipedemaMod / 2 + 1) * slimModButts); diff --git a/src/endWeek/saPregnancy.js b/src/endWeek/saPregnancy.js index fe68632c4ce..d1184aa9649 100644 --- a/src/endWeek/saPregnancy.js +++ b/src/endWeek/saPregnancy.js @@ -615,7 +615,7 @@ App.SlaveAssignment.pregnancy = function saPregnancy(slave) { */ function pregnancyPhysicalEffects(slave) { let boobTarget; - const slimnessFoodMod = V.arcologies[0].FSSlimnessFoodLaw === 1 ? 0.5 : 1; + const slimnessFoodMod = V.arcologies[0].FSSlimnessEnthusiastFoodLaw === 1 ? 0.5 : 1; if (slave.geneMods.NCS === 1) { // NCS: always working against secondary sexual characteristics even in pregnancies. boobTarget = 0; diff --git a/src/events/intro/initNationalities.js b/src/events/intro/initNationalities.js index 213a1bdf0c6..7aaeeec2563 100644 --- a/src/events/intro/initNationalities.js +++ b/src/events/intro/initNationalities.js @@ -334,6 +334,7 @@ App.Intro.initNationalities = function() { V.arcologies[0].FSMaturityPreferentialistSMR = 0; V.arcologies[0].FSSlimnessEnthusiastSMR = 0; V.arcologies[0].FSSlimnessEnthusiastLaw = 0; + V.arcologies[0].FSSlimnessEnthusiastFoodLaw = 0; V.arcologies[0].FSAssetExpansionistSMR = 0; V.arcologies[0].FSPastoralistLaw = 0; V.arcologies[0].FSPastoralistSMR = 0; diff --git a/src/futureSocieties/futureSociety.js b/src/futureSocieties/futureSociety.js index ac1d705d18a..e9f299f9ac5 100644 --- a/src/futureSocieties/futureSociety.js +++ b/src/futureSocieties/futureSociety.js @@ -297,6 +297,11 @@ globalThis.FutureSocieties = (function() { case "FSAssetExpansionist": arcology[FSSMR] = 0; break; + case "FSSlimnessEnthusiast": + arcology.FSSlimnessEnthusiastLaw = 0; + arcology.FSSlimnessEnthusiastFoodLaw = 0; + arcology.FSSlimnessEnthusiastSMR = 0; + break; case "FSPhysicalIdealist": arcology.FSPhysicalIdealistLaw = 0; arcology.FSPhysicalIdealistSMR = 0; diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 602cfc5b41f..0bb95adce6a 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -806,7 +806,7 @@ globalThis.calculateCosts = (function() { } function getPCFoodCosts() { - const slimnessFoodMod = V.arcologies[0].FSSlimnessFoodLaw === 1 && !canEatFood(V.PC) ? 1.15 : 1; + const slimnessFoodMod = V.arcologies[0].FSSlimnessEnthusiastFoodLaw === 1 && !canEatFood(V.PC) ? 1.15 : 1; const foodCost = V.mods.food.cost * slimnessFoodMod; let costs = 0; // Well this ought to be a mess. @@ -1125,7 +1125,7 @@ globalThis.getSlaveCostArray = function(s) { let cost = 0; let retval = []; let t = ""; - const slimnessFoodMod = V.arcologies[0].FSSlimnessFoodLaw === 1 ? 1.15 : 1; + const slimnessFoodMod = V.arcologies[0].FSSlimnessEnthusiastFoodLaw === 1 ? 1.15 : 1; const rulesCost = V.rulesCost; const foodCost = V.mods.food.cost * slimnessFoodMod; const drugsCost = V.drugsCost; -- GitLab