diff --git a/devTools/types/FC/arcology.d.ts b/devTools/types/FC/arcology.d.ts index 75413f5f629bea4761baaa586d193a00185a45f4..43410b757c2fc9f1ccd74f30a0dfab45808c95c1 100644 --- a/devTools/types/FC/arcology.d.ts +++ b/devTools/types/FC/arcology.d.ts @@ -134,6 +134,7 @@ declare namespace FC { FSDegradationistSMR: Bool; FSBodyPuristLaw: number; FSBodyPuristSMR: Bool; + FSBodyPuristCatLaw: Bool; FSTransformationFetishistSMR: Bool; FSYouthPreferentialistLaw: number; FSYouthPreferentialistSMR: Bool; diff --git a/js/random.js b/js/random.js index 48a110f2bf95aae17796265eedf327d66a6638bd..f21de6962ce4922b8ee608cea4c3809616e7ec77 100644 --- a/js/random.js +++ b/js/random.js @@ -55,9 +55,10 @@ function jsRandom(min, max, count = 1) { /** * Chooses multiple random elements of an array. - * @param {number[]} arr + * @template {*} T + * @param {Array<T>} arr * @param {number} count - * @returns {number[]} + * @returns {Array<T>} */ function jsRandomMany(arr, count) { let result = []; @@ -71,15 +72,16 @@ function jsRandomMany(arr, count) { /** * Accepts both an array and a list, returns undefined if nothing is passed. - * @param {any[]} choices - * @param {any} [otherChoices] - * @returns {any} + * @template {*} T + * @param {Array<T>} choices + * @param {...T} [otherChoices] + * @returns {T} */ function jsEither(choices, ...otherChoices) { if (otherChoices.length === 0 && Array.isArray(choices)) { return choices[Math.floor(Math.random() * choices.length)]; } const allChoices = otherChoices; - allChoices.push(choices); + allChoices.push(...choices); return allChoices[Math.floor(Math.random() * allChoices.length)]; } diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js index 2b2376399eda084261093881a7758e7c7a28656c..af208c3af39a5e3cb963737fd460c5b677004527 100644 --- a/src/data/backwardsCompatibility/backwardsCompatibility.js +++ b/src/data/backwardsCompatibility/backwardsCompatibility.js @@ -968,6 +968,10 @@ App.Update.globalVariables = function(node) { V.arcologies[0].FSStatuesqueGlorification = 10; App.UI.DOM.appendNewElement("div", node, `Fixed NaN FS value for FSStatuesqueGlorification`); } + // Cat Mod + if (V.arcologies[0].FSBodyPuristCatLaw === undefined) { + V.arcologies[0].FSBodyPuristCatLaw = 0; + } // Clean up FS in player arcology App.Update.FScheatDatatypeCleanup(); } diff --git a/src/events/intro/initNationalities.js b/src/events/intro/initNationalities.js index 01a9b2a69b2c37d7952afc0ad9de39268f6a276f..eead7190f1cbbffe26edb3123031233f88636892 100644 --- a/src/events/intro/initNationalities.js +++ b/src/events/intro/initNationalities.js @@ -448,6 +448,7 @@ App.Intro.initNationalities = function() { V.arcologies[0].FSDegradationistSMR = 0; V.arcologies[0].FSBodyPuristLaw = 0; V.arcologies[0].FSBodyPuristSMR = 0; + V.arcologies[0].FSBodyPuristCatLaw = 0; V.arcologies[0].FSTransformationFetishistSMR = 0; V.arcologies[0].FSYouthPreferentialistLaw = 0; V.arcologies[0].FSYouthPreferentialistSMR = 0;