diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt index 04ba4bc747b82de5b2e30f1bd9fda3e63cf68586..dae7a161ddabdac96715ccd310bda94855244fd1 100644 --- a/devNotes/twine JS.txt +++ b/devNotes/twine JS.txt @@ -37141,15 +37141,15 @@ window.ArcologyDatatypeCleanup = function ArcologyDatatypeCleanup() { V.economy = Math.max(+V.economy, 20) || 100; V.difficultySwitch = Math.clamp(+V.difficultySwitch, 0, 1) || 0; V.localEcon = Math.max(+V.localEcon, 20) || V.economy; - V.econRate = Math.clamp(V.econRate, 1, 4) || 2; + V.econRate = Math.clamp(+V.econRate, 1, 4) || 2; V.slaveCostFactor = Math.max(+V.slaveCostFactor, 0) || 1; if (V.menialSupplyFactor !== 0) { - V.menialSupplyFactor = Math.clamp(V.menialSupplyFactor, -50000, 50000) || (1 - V.slaveCostFactor) * 400 * 1000 * 0.5; /* (1 - slaveCostFactor) * price elasticity * base price * 0.5 */ + V.menialSupplyFactor = Math.clamp(+V.menialSupplyFactor, -50000, 50000) || (1 - V.slaveCostFactor) * 400 * 1000 * 0.5; /* (1 - slaveCostFactor) * price elasticity * base price * 0.5 */ } if (V.menialDemandFactor !== 0) { - V.menialDemandFactor = Math.clamp(V.menialDemandFactor, -50000, 50000) || -V.menialSupplyFactor; + V.menialDemandFactor = Math.clamp(+V.menialDemandFactor, -50000, 50000) || -V.menialSupplyFactor; } - V.slaveCostRandom = Math.clamp(V.slaveCostRandom, -3, 3) || 0; + V.slaveCostRandom = Math.clamp(+V.slaveCostRandom, -3, 3) || 0; V.demandTimer = Math.max(+V.demandTimer, 0) || 0; V.elapsedDemandTimer = Math.max(+V.elapsedDemandTimer, 0) || 0; V.supplyTimer = Math.max(+V.supplyTimer, 0) || 0; @@ -37157,7 +37157,12 @@ window.ArcologyDatatypeCleanup = function ArcologyDatatypeCleanup() { V.deltaSupply = Math.clamp(+V.deltaSupply, -3000, 3000) || 0; V.deltaDemand = Math.clamp(+V.deltaDemand, -3000, 3000) || 0; V.econWeatherDamage = Math.max(+V.econWeatherDamage, 0) || 0; - V.disasterResponse = Math.clamp(V.disasterResponse, 0, 2) || 0; + V.disasterResponse = Math.clamp(+V.disasterResponse, 0, 2) || 0; + V.GDP = Math.max(+V.GDP, 1) || 278.6; + V.NPCSlaves = Math.max(+V.NPCSlaves, 0) || 0; + V.helots = Math.max(+V.helots, 0) || 0; + V.fuckdolls = Math.max(+V.fuckdolls , 0) || 0; + V.menialBioreactors = Math.max(+V.menialBioreactors , 0) || 0; V.foodCost = Math.trunc(2500/V.economy); V.drugsCost = Math.trunc(10000/V.economy); diff --git a/src/js/datatypeCleanupJS.tw b/src/js/datatypeCleanupJS.tw index b3a6cc84ff8675077e09a09040cd427a0ca72547..b3c0705bcc8087deb76c6cacb49c1221253d0f2d 100644 --- a/src/js/datatypeCleanupJS.tw +++ b/src/js/datatypeCleanupJS.tw @@ -1210,15 +1210,15 @@ window.ArcologyDatatypeCleanup = function ArcologyDatatypeCleanup() { V.economy = Math.max(+V.economy, 20) || 100; V.difficultySwitch = Math.clamp(+V.difficultySwitch, 0, 1) || 0; V.localEcon = Math.max(+V.localEcon, 20) || V.economy; - V.econRate = Math.clamp(V.econRate, 1, 4) || 2; + V.econRate = Math.clamp(+V.econRate, 1, 4) || 2; V.slaveCostFactor = Math.max(+V.slaveCostFactor, 0) || 1; if (V.menialSupplyFactor !== 0) { - V.menialSupplyFactor = Math.clamp(V.menialSupplyFactor, -50000, 50000) || (1 - V.slaveCostFactor) * 400 * 1000 * 0.5; /* (1 - slaveCostFactor) * price elasticity * base price * 0.5 */ + V.menialSupplyFactor = Math.clamp(+V.menialSupplyFactor, -50000, 50000) || (1 - V.slaveCostFactor) * 400 * 1000 * 0.5; /* (1 - slaveCostFactor) * price elasticity * base price * 0.5 */ } if (V.menialDemandFactor !== 0) { - V.menialDemandFactor = Math.clamp(V.menialDemandFactor, -50000, 50000) || -V.menialSupplyFactor; + V.menialDemandFactor = Math.clamp(+V.menialDemandFactor, -50000, 50000) || -V.menialSupplyFactor; } - V.slaveCostRandom = Math.clamp(V.slaveCostRandom, -3, 3) || 0; + V.slaveCostRandom = Math.clamp(+V.slaveCostRandom, -3, 3) || 0; V.demandTimer = Math.max(+V.demandTimer, 0) || 0; V.elapsedDemandTimer = Math.max(+V.elapsedDemandTimer, 0) || 0; V.supplyTimer = Math.max(+V.supplyTimer, 0) || 0; @@ -1226,7 +1226,12 @@ window.ArcologyDatatypeCleanup = function ArcologyDatatypeCleanup() { V.deltaSupply = Math.clamp(+V.deltaSupply, -3000, 3000) || 0; V.deltaDemand = Math.clamp(+V.deltaDemand, -3000, 3000) || 0; V.econWeatherDamage = Math.max(+V.econWeatherDamage, 0) || 0; - V.disasterResponse = Math.clamp(V.disasterResponse, 0, 2) || 0; + V.disasterResponse = Math.clamp(+V.disasterResponse, 0, 2) || 0; + V.GDP = Math.max(+V.GDP, 1) || 278.6; + V.NPCSlaves = Math.max(+V.NPCSlaves, 0) || 0; + V.helots = Math.max(+V.helots, 0) || 0; + V.fuckdolls = Math.max(+V.fuckdolls , 0) || 0; + V.menialBioreactors = Math.max(+V.menialBioreactors , 0) || 0; V.foodCost = Math.trunc(2500/V.economy); V.drugsCost = Math.trunc(10000/V.economy); diff --git a/src/uncategorized/arcmgmt.tw b/src/uncategorized/arcmgmt.tw index 4a3b41cf82566bf94fd8ee76c2cf6efdc3283aaf..614f88364a553396000d048d48a73bd8ec4481e1 100644 --- a/src/uncategorized/arcmgmt.tw +++ b/src/uncategorized/arcmgmt.tw @@ -149,8 +149,8 @@ _topClassP = 1>> <</if>> <<if $arcologies[0].FSAssetExpansionist != "unset">> <<set _FSScore += Math.min($arcologies[0].FSAssetExpansionist, 100)>> - <<if $arcologies[0].FSBodypurist != "unset">> - <<set _expirationFS *= 1 + (Math.trunc(Math.min($arcologies[0].FSAssetExpansionist, 100) / 20) * 0.05) * (1 + (Math.trunc(Math.min($arcologies[0].FSBodypurist, 100) / 20) * -0.1))>> + <<if $arcologies[0].FSBodyPurist != "unset">> + <<set _expirationFS *= 1 + (Math.trunc(Math.min($arcologies[0].FSAssetExpansionist, 100) / 20) * 0.05) * (1 + (Math.trunc(Math.min($arcologies[0].FSBodyPurist, 100) / 20) * -0.1))>> <<else>> <<set _expirationFS *= 1 + Math.trunc(Math.min($arcologies[0].FSAssetExpansionist, 100) / 20) * 0.05>> <</if>>