diff --git a/src/002-config/fc-version.js b/src/002-config/fc-version.js index 13d2f133c4e74f941a4893b1e9ad54253cdd245a..9b31d425185acb64c5400c860899fa014a13de01 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.23", commitHash: null, - release: 1189, // When getting close to 2000, please remove the check located within the onLoad() function defined at line five of src/js/eventHandlers.js. + release: 1190, // 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 d13e4f1c23e937404d43a3ba573c1022da730504..ab4c98677200304a66a9c8ff9d23ff50331db42b 100644 --- a/src/data/backwardsCompatibility/backwardsCompatibility.js +++ b/src/data/backwardsCompatibility/backwardsCompatibility.js @@ -2146,51 +2146,21 @@ App.Update.oldVersions = function(node) { if (typeof V.PC.ballType === "undefined") { V.PC.ballType = "human"; } + const quirks = {}; + App.Data.geneticQuirks.forEach((value, q) => quirks[q] = 0); if (typeof V.PC.geneticQuirks === "undefined") { - V.PC.geneticQuirks = { - macromastia: 0, - gigantomastia: 0, - fertility: 0, - hyperFertility: 0, - superfetation: 0, - uterineHypersensitivity: 0, - gigantism: 0, - dwarfism: 0, - pFace: 0, - uFace: 0, - albinism: 0, - heterochromia: 0, - rearLipedema: 0, - wellHung: 1, - wGain: 0, - wLoss: 0, - mGain: 0, - mLoss: 0, - androgyny: 0, - girlsOnly: 0 - }; + // initialize quirks from scratch + V.PC.geneticQuirks = clone(quirks); if (V.PC.birthMaster > 0) { V.PC.geneticQuirks.fertility = 2; } else if (V.PC.career === "servant") { V.PC.geneticQuirks.fertility = 1; } } else { - if (typeof V.PC.geneticQuirks.heterochromia === "undefined") { - V.PC.geneticQuirks.heterochromia = 0; - } - if (typeof V.PC.geneticQuirks.girlsOnly === "undefined") { - V.PC.geneticQuirks.girlsOnly = 0; - } - if (typeof V.PC.geneticQuirks.mGain === "undefined") { - V.PC.geneticQuirks.mGain = 0; - } - if (typeof V.PC.geneticQuirks.mLoss === "undefined") { - V.PC.geneticQuirks.mLoss = 0; - } - if (typeof V.PC.geneticQuirks.uterineHypersensitivity === "undefined") { - V.PC.geneticQuirks.uterineHypersensitivity = 0; - } + // add any new quirks + V.PC.geneticQuirks = Object.assign(clone(quirks), V.PC.geneticQuirks); } + V.PC.geneMods = Object.assign({NCS: 0, rapidCellGrowth: 0, immortality: 0, flavoring: 0, aggressiveSperm: 0, livestock: 0, progenitor: 0}, V.PC.geneMods); if (V.releaseID < 1032) { if (V.PC.pregSource === -1) { V.PC.pregSource = -6;