From 3b23413c97384085dc7e2e89b639bdd6d43456df Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Mon, 2 Mar 2020 10:18:15 -0500
Subject: [PATCH] move PC fully into its function

---
 .../backwardsCompatibility.js                 | 31 ++-----------------
 .../backwardsCompatibility/datatypeCleanup.js | 29 +++++++++++++++++
 2 files changed, 31 insertions(+), 29 deletions(-)

diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js
index cb05e7ea51f..64fe6a9f098 100644
--- a/src/data/backwardsCompatibility/backwardsCompatibility.js
+++ b/src/data/backwardsCompatibility/backwardsCompatibility.js
@@ -1010,9 +1010,7 @@ App.Update.generalBC = function() {
 	V.upgradeMultiplierArcology = upgradeMultiplier('engineering');
 	V.upgradeMultiplierMedicine = upgradeMultiplier('medicine');
 	V.upgradeMultiplierTrade = upgradeMultiplier('trading');
-	if (V.PC.customTitle === "") {
-		V.PC.customTitle = undefined, V.PC.customTitleLisp = undefined;
-	}
+
 
 	BCReserveInit();
 
@@ -2769,32 +2767,7 @@ App.Update.globalVariables = function() {
 		}
 	}
 	V.seeDicks = Math.clamp(V.seeDicks, 0, 100);
-	if (typeof V.PC.ID === "undefined") {
-		V.PC.ID = -1;
-	}
-	if (typeof V.PC.counter.oral === "undefined") {
-		V.PC.counter.oral = 0;
-	}
-	if (typeof V.PC.counter.vaginal === "undefined") {
-		V.PC.counter.vaginal = 0;
-	}
-	if (typeof V.PC.counter.anal === "undefined") {
-		V.PC.counter.anal = 0;
-	}
-	if (typeof V.PC.counter.mammary === "undefined") {
-		V.PC.counter.mammary = 0;
-	}
-	if (typeof V.PC.counter.penetrative === "undefined") {
-		V.PC.counter.penetrative = 0;
-	}
-	if (!(V.ver.startsWith("0.10"))) {
-		if (V.PC.refreshment === "cigar") {
-			V.PC.refreshmentType = 0;
-		} else {
-			V.PC.refreshmentType = 1;
-		}
-	}
-	WombInit(V.PC);
+
 
 	if (typeof V.pornStars === "undefined") {
 		V.studioFeed = 0;
diff --git a/src/data/backwardsCompatibility/datatypeCleanup.js b/src/data/backwardsCompatibility/datatypeCleanup.js
index 5d33a2c1155..a28f162b3d9 100644
--- a/src/data/backwardsCompatibility/datatypeCleanup.js
+++ b/src/data/backwardsCompatibility/datatypeCleanup.js
@@ -1660,6 +1660,13 @@ window.PCDatatypeCleanup = function PCDatatypeCleanup() {
 	if (typeof PC.refreshment !== "string") {
 		PC.refreshment = "cigar";
 	}
+	if (!(V.ver.startsWith("0.10"))) {
+		if (V.PC.refreshment === "cigar") {
+			V.PC.refreshmentType = 0;
+		} else {
+			V.PC.refreshmentType = 1;
+		}
+	}
 	PC.refreshmentType = Math.clamp(+PC.refreshmentType, 0, 6) || 0;
 	PC.skill.trading = Math.clamp(+PC.skill.trading, -100, 100) || 0;
 	PC.skill.warfare = Math.clamp(+PC.skill.warfare, -100, 100) || 0;
@@ -1755,6 +1762,28 @@ window.PCDatatypeCleanup = function PCDatatypeCleanup() {
 	} else {
 		PC.buttImplantType = "none";
 	}
+	if (V.PC.customTitle === "") {
+		V.PC.customTitle = undefined, V.PC.customTitleLisp = undefined;
+	}
+	if (typeof V.PC.counter.oral === "undefined") {
+		V.PC.counter.oral = 0;
+	}
+	if (typeof V.PC.counter.vaginal === "undefined") {
+		V.PC.counter.vaginal = 0;
+	}
+	if (typeof V.PC.counter.anal === "undefined") {
+		V.PC.counter.anal = 0;
+	}
+	if (typeof V.PC.counter.mammary === "undefined") {
+		V.PC.counter.mammary = 0;
+	}
+	if (typeof V.PC.counter.penetrative === "undefined") {
+		V.PC.counter.penetrative = 0;
+	}
+	WombInit(V.PC);
+	if (typeof V.PC.ID === "undefined") {
+		V.PC.ID = -1;
+	}
 
 	/* None of these are in use */
 	PC.bellyPreg = PC.belly;
-- 
GitLab