diff --git a/src/cheats/PCCheatMenuCheatDatatypeCleanup.tw b/src/cheats/PCCheatMenuCheatDatatypeCleanup.tw index 5d300e00c5bef21d854925e1db8c1b0569ac6517..6f5686397e9e1c5736db2ca462c0a6d4e434d16a 100644 --- a/src/cheats/PCCheatMenuCheatDatatypeCleanup.tw +++ b/src/cheats/PCCheatMenuCheatDatatypeCleanup.tw @@ -12,62 +12,6 @@ <</if>> <<unset $customEvalCode>> -<<set $PC.preg = Number($PC.preg) || 0>> -<<set $PC.pregSource = Number($PC.pregSource) || 0>> -<<set $PC.pregType = Number($PC.pregType) || 0>> -<<set WombInit($PC)>> /* just to make sure */ -<<set $PC.womb.length = 0>> /* simple way to delete all fetuses */ -<<set WombImpregnate($PC, $PC.pregType, $PC.pregSource, $PC.preg)>> /* recreates fetuses */ -<<if $PC.preg > 0>> - <<set $PC.belly = WombGetVolume($PC)>> - <<set $PC.pregWeek = $PC.preg>> -<<else>> - <<set $PC.belly = 0>> - <<set $PC.pregWeek = 0>> -<</if>> - -<<if $PC.boobs < 300>> - <<set $PC.boobs = 100>> - <<set $PC.boobsImplant = 0>> -<</if>> -<<if $PC.boobsImplant > $PC.boobs>> - <<set $PC.boobsImplant = $PC.boobs>> -<</if>> -<<if $PC.butt < 2>> - <<set $PC.butt = 2>> - <<set $PC.buttImplant = 0>> -<</if>> -<<if $PC.buttImplant > $PC.butt>> - <<set $PC.buttImplant = $PC.butt>> -<</if>> -<<if $PC.dick == 0>> - <<set $PC.balls = 0>> - <<set $PC.ballsImplant = 0>> - <<set $PC.scrotum = 0>> - <<set $PC.prostate = 0>> -<</if>> -<<if $PC.ballsImplant > $PC.balls>> - <<set $PC.ballsImplant = $PC.balls>> -<</if>> -<<if $PC.vagina == -1>> - <<set $PC.newVag = 0>> - <<set $PC.ovaries = 0>> - <<set $PC.vaginaLube = 0>> -<</if>> -<<if $PC.lactation > 0 && $PC.lactationDuration == 0>> - <<set $PC.lactationDuration = 2>> -<<elseif $PC.lactation == 0 && $PC.lactationDuration > 0>> - <<set $PC.lactationDuration = 0>> -<</if>> -<<set $PC.eye.left.iris = $PC.eye.right.iris>> -<<set $PC.eye.left.pupil = $PC.eye.right.pupil>> -<<set $PC.eye.left.sclera = $PC.eye.right.sclera>> +<<run App.Entity.Utils.PCCheatCleanup>> You perform the dark rituals, pray to the dark gods, and sell your soul for the power to reshape your body and life at will. What a cheater! - -<<run ibc.recalculate_coeff_id(-1)>> -<<run PCDatatypeCleanup()>> -<<set $upgradeMultiplierArcology = upgradeMultiplier('engineering')>> -<<set $upgradeMultiplierMedicine = upgradeMultiplier('medicine')>> -<<set $upgradeMultiplierTrade = upgradeMultiplier('trading')>> -<<set $HackingSkillMultiplier = upgradeMultiplier('hacking')>> diff --git a/src/data/backwardsCompatibility/datatypeCleanup.js b/src/data/backwardsCompatibility/datatypeCleanup.js index 4b5f082552b82abc20fbb4ac0c4e709a31eb6067..0b261ca576f27ead0d11adff37ca1e497cc379c0 100644 --- a/src/data/backwardsCompatibility/datatypeCleanup.js +++ b/src/data/backwardsCompatibility/datatypeCleanup.js @@ -2479,3 +2479,63 @@ App.Update.neighborArcologyCheatDatatypeCleanup = function() { V.arcologies[_i].rival = Number(V.arcologies[_i].rival) || 0; } }; + +App.Entity.Utils.PCCheatCleanup = function() { + V.PC.preg = Number(V.PC.preg) || 0; + V.PC.pregSource = Number(V.PC.pregSource) || 0; + V.PC.pregType = Number(V.PC.pregType) || 0; + WombInit(V.PC); // just to make sure + V.PC.womb.length = 0; // simple way to delete all fetuses + WombImpregnate(V.PC, V.PC.pregType, V.PC.pregSource, V.PC.preg);// recreates fetuses + if (V.PC.preg > 0) { + V.PC.belly = WombGetVolume(V.PC); + V.PC.pregWeek = V.PC.preg; + } else { + V.PC.belly = 0; + V.PC.pregWeek = 0; + } + + if (V.PC.boobs < 300) { + V.PC.boobs = 100; + V.PC.boobsImplant = 0; + } + if (V.PC.boobsImplant > V.PC.boobs) { + V.PC.boobsImplant = V.PC.boobs; + } + if (V.PC.butt < 2) { + V.PC.butt = 2; + V.PC.buttImplant = 0; + } + if (V.PC.buttImplant > V.PC.butt) { + V.PC.buttImplant = V.PC.butt; + } + if (V.PC.dick === 0) { + V.PC.balls = 0; + V.PC.ballsImplant = 0; + V.PC.scrotum = 0; + V.PC.prostate = 0; + } + if (V.PC.ballsImplant > V.PC.balls) { + V.PC.ballsImplant = V.PC.balls; + } + if (V.PC.vagina === -1) { + V.PC.newVag = 0; + V.PC.ovaries = 0; + V.PC.vaginaLube = 0; + } + if (V.PC.lactation > 0 && V.PC.lactationDuration === 0) { + V.PC.lactationDuration = 2; + } else if (V.PC.lactation === 0 && V.PC.lactationDuration > 0) { + V.PC.lactationDuration = 0; + } + V.PC.eye.left.iris = V.PC.eye.right.iris; + V.PC.eye.left.pupil = V.PC.eye.right.pupil; + V.PC.eye.left.sclera = V.PC.eye.right.sclera; + + ibc.recalculate_coeff_id(-1); + PCDatatypeCleanup(); + V.upgradeMultiplierArcology = upgradeMultiplier('engineering'); + V.upgradeMultiplierMedicine = upgradeMultiplier('medicine'); + V.upgradeMultiplierTrade = upgradeMultiplier('trading'); + V.HackingSkillMultiplier = upgradeMultiplier('hacking'); +};