diff --git a/src/data/backwardsCompatibility/datatypeCleanup.js b/src/data/backwardsCompatibility/datatypeCleanup.js index d73617bdf92f093f14da16c18d9b0e1fb0f86dfe..1a4f4d4930733894384ef8dccd072d8042295533 100644 --- a/src/data/backwardsCompatibility/datatypeCleanup.js +++ b/src/data/backwardsCompatibility/datatypeCleanup.js @@ -1537,10 +1537,10 @@ globalThis.PCDatatypeCleanup = (function PCDatatypeCleanup() { PC.refreshment = "cigar"; } if (!(V.ver.startsWith("0.10"))) { - if (V.PC.refreshment === "cigar") { - V.PC.refreshmentType = 0; + if (PC.refreshment === "cigar") { + PC.refreshmentType = 0; } else { - V.PC.refreshmentType = 1; + PC.refreshmentType = 1; } } PC.refreshmentType = Math.clamp(+PC.refreshmentType, 0, 6) || 0; @@ -1638,9 +1638,9 @@ globalThis.PCDatatypeCleanup = (function PCDatatypeCleanup() { * @param {App.Entity.PlayerState} PC */ function PCCustomStatsDatatypeCleanup(PC) { - if (V.PC.customTitle === "") { - V.PC.customTitle = undefined; - V.PC.customTitleLisp = undefined; + if (PC.customTitle === "") { + PC.customTitle = undefined; + PC.customTitleLisp = undefined; } } @@ -1648,8 +1648,8 @@ globalThis.PCDatatypeCleanup = (function PCDatatypeCleanup() { * @param {App.Entity.PlayerState} PC */ function PCMiscellaneousDatatypeCleanup(PC) { - if (typeof V.PC.ID === "undefined") { - V.PC.ID = -1; + if (typeof PC.ID === "undefined") { + PC.ID = -1; } PC.chem = Math.max(+PC.chem, 0) || 0; PC.addict = Math.max(+PC.addict, 0) || 0; @@ -1673,8 +1673,8 @@ globalThis.PCDatatypeCleanup = (function PCDatatypeCleanup() { if (PC.indentureRestrictions !== undefined) { delete PC.indentureRestrictions; } - if (typeof V.PC.partners !== "object") { - V.PC.partners = new Set(); + if (typeof PC.partners !== "object") { + PC.partners = new Set(); } PC.accent = 0; // Might not use? Would be related to changing languages. Might not work out. } @@ -2621,7 +2621,7 @@ App.Entity.Utils.PCCheatCleanup = function() { } ibc.recalculate_coeff_id(-1); - PCDatatypeCleanup(); + PCDatatypeCleanup(V.PC); V.upgradeMultiplierArcology = upgradeMultiplier('engineering'); V.upgradeMultiplierMedicine = upgradeMultiplier('medicine'); V.upgradeMultiplierTrade = upgradeMultiplier('trading');