From 1af39af500b716c33a3b72b29bc511a5685c2ea4 Mon Sep 17 00:00:00 2001
From: Svornost <11434-svornost@users.noreply.gitgud.io>
Date: Tue, 3 Mar 2020 20:56:27 -0800
Subject: [PATCH] Make $bellyAccessory local

---
 src/pregmod/saClothes.tw                   |  2 +-
 src/uncategorized/nextWeek.tw              |  2 +-
 src/uncategorized/saLongTermEffects.tw     | 14 +++++++-------
 src/uncategorized/saRecruitGirls.tw        |  8 ++++----
 src/utility/descriptionWidgetsFlesh.tw     |  3 +--
 src/utility/descriptionWidgetsPiercings.tw |  2 +-
 6 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/src/pregmod/saClothes.tw b/src/pregmod/saClothes.tw
index 6bc875d5f3b..d319eab9c5a 100644
--- a/src/pregmod/saClothes.tw
+++ b/src/pregmod/saClothes.tw
@@ -514,7 +514,7 @@
 		<<if $slaves[$i].belly > 10000>>
 			$His pregnancy support band takes some weight off $his back, but it does little beyond that.
 		<</if>>
-	<<elseif setup.fakeBellies.includes($bellyAccessory)>>
+	<<elseif setup.fakeBellies.includes($slaves[$i].bellyAccessory)>>
 		<<if $slaves[$i].weight > 130>>
 			$He has trouble keeping $his fake belly strapped around $his huge gut, forcing it to be removed to prevent damage.
 			<<set $slaves[$i].bellyAccessory = "none">>
diff --git a/src/uncategorized/nextWeek.tw b/src/uncategorized/nextWeek.tw
index 7a33afb0859..1973cef6dae 100644
--- a/src/uncategorized/nextWeek.tw
+++ b/src/uncategorized/nextWeek.tw
@@ -351,7 +351,7 @@
 <<set $beforeGingering = null>>
 
 /% Strings Memory varies. %/
-<<set $bellyAccessory = "", $buyer = "", $desc = "", $event = "", $goto = "", $malefactor = "", $oldName = "", $oldSurname = "", $k = "">>
+<<set $buyer = "", $desc = "", $event = "", $goto = "", $malefactor = "", $oldName = "", $oldSurname = "", $k = "">>
 /% Done with zeroing out, what should be for the most part Temps %/
 
 <<run clearSummaryCache()>>
diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw
index 08082b3adfe..8038416d56b 100644
--- a/src/uncategorized/saLongTermEffects.tw
+++ b/src/uncategorized/saLongTermEffects.tw
@@ -1,8 +1,8 @@
 :: SA long term effects [nobr]
 
 <<set _fetishChangeChance = fetishChangeChance($slaves[$i])>>
-<<set $bellyAccessory = $slaves[$i].bellyAccessory>>
-<<if $bellyAccessory == "a support band">>
+<<set _bellyAccessory = $slaves[$i].bellyAccessory>>
+<<if _bellyAccessory == "a support band">>
 	<<set _bellyBand = 2>>
 <<else>>
 	<<set _bellyBand = 1>>
@@ -1399,7 +1399,7 @@
 				<<elseif $slaves[$i].bellyImplant >= 60000>>
 					$His paraphilia is satisfied by $his overfilled belly implant.
 					<<set _para = 1>>
-				<<elseif setup.fakeBellies.includes($bellyAccessory)>>
+				<<elseif setup.fakeBellies.includes(_bellyAccessory)>>
 					$He @@.mediumorchid;loathes@@ being forced to carry a fake pregnancy.
 					<<set _para = -1>>
 					<<set $slaves[$i].devotion -= 3>>
@@ -4202,7 +4202,7 @@
 				$His areolae darken with $his progressing pregnancy.
 			<</if>>
 		<<elseif $slaves[$i].bellyPreg >= 1500>>
-			<<if setup.fakeBellies.includes($bellyAccessory)>>
+			<<if setup.fakeBellies.includes(_bellyAccessory)>>
 				$His growing pregnancy renders $his fake belly moot.
 				<<set $slaves[$i].bellyAccessory = "none">>
 			<</if>>
@@ -4550,7 +4550,7 @@
 
 	<<include "SA inflation">>
 
-	<<if setup.fakeBellies.includes($bellyAccessory)>>
+	<<if setup.fakeBellies.includes(_bellyAccessory)>>
 		$He has trouble keeping $himself full of
 		<<switch $slaves[$i].inflationType>>
 		<<case "cum" "food" "milk" "urine" "water">>
@@ -4853,7 +4853,7 @@
 		<</if>>
 	<</if>>
 <<elseif $slaves[$i].bellyImplant >= 1500>>
-	<<if setup.fakeBellies.includes($bellyAccessory)>>
+	<<if setup.fakeBellies.includes(_bellyAccessory)>>
 		$His implant rounded belly renders $his fake one moot.
 		<<set $slaves[$i].bellyAccessory = "none">>
 	<</if>>
@@ -5411,7 +5411,7 @@
 		<<elseif $slaves[$i].pregWeek < 0>>
 			Society is @@.green;pleased@@ by $slaves[$i].slaveName's recent birth.
 			<<= FutureSocieties.ChangePorn("RepopulationFocus", 2)>>
-		<<elseif setup.fakeBellies.includes($bellyAccessory)>>
+		<<elseif setup.fakeBellies.includes(_bellyAccessory)>>
 			Society is @@.green;placated@@ by $slaves[$i].slaveName's fake belly.
 			<<run repX(0.01*$FSSingleSlaveRep, "futureSocieties", $slaves[$i])>>
 		<<elseif $arcologies[0].FSSubjugationist != "unset" && ($slaves[$i].race == $arcologies[0].FSSubjugationistRace)>>
diff --git a/src/uncategorized/saRecruitGirls.tw b/src/uncategorized/saRecruitGirls.tw
index 70e1fce44d8..59419b94c30 100644
--- a/src/uncategorized/saRecruitGirls.tw
+++ b/src/uncategorized/saRecruitGirls.tw
@@ -1,6 +1,6 @@
 :: SA recruit girls [nobr]
 
-<<set $bellyAccessory = $slaves[$i].bellyAccessory>>
+<<set _bellyAccessory = $slaves[$i].bellyAccessory>>
 
 /* Note on target sum: HG and Recruiter are the initial 2 counted (no facility req'd), while HGSuite counts the HG's girl, other facilities count associated leader */
 <<if $recruiterIdleRule == "number">>
@@ -399,7 +399,7 @@
 			$He does $his best to convince them that being your slave whore will be safer and healthier than streetwalking.
 		<</if>>
 	<<elseif $recruiterTarget == "expectant mothers">> /* now you can ginger too */
-		<<if (($Recruiter.belly >= 1500 || setup.fakeBellies.includes($bellyAccessory) && $Recruiter.weight < 130) || $Recruiter.belly >= 100000)>>
+		<<if (($Recruiter.belly >= 1500 || setup.fakeBellies.includes(_bellyAccessory) && $Recruiter.weight < 130) || $Recruiter.belly >= 100000)>>
 			<<if $Recruiter.preg > $Recruiter.pregData.normalBirth/8>>
 				Since $he's visibly pregnant $himself, $he speaks with authority when $he says that Free Cities medicine can keep them and their pregnancies safe and healthy.
 			<<else>>
@@ -544,7 +544,7 @@
 				<<set _seed += 1>>
 			<</if>>
 		<<else>>
-			<<if $slaves[$i].balls < 1 && ($slaves[$i].bellPreg >= 1500 || setup.fakeBellies.includes($bellyAccessory))>>
+			<<if $slaves[$i].balls < 1 && ($slaves[$i].bellPreg >= 1500 || setup.fakeBellies.includes(_bellyAccessory))>>
 				<<if $slaves[$i].bellPreg >= 1500>>
 					<<set _seed += 4>>
 				<<else>>
@@ -888,7 +888,7 @@
 				<<if $arcologies[0].FSRestart == "unset">>
 					<<if $slaves[$i].bellyPreg >= 1500>>
 						$He unashamedly live streams an obstetric health check in the nude, promising to broadcast similar footage right up until, and during, the birth.
-					<<elseif setup.fakeBellies.includes($bellyAccessory)>>
+					<<elseif setup.fakeBellies.includes(_bellyAccessory)>>
 						With some discreet editing, $he uploads fake ultrasounds to match $his plastic pregnancy, bringing a little more attention to your fertility campaigns.
 					<<else>>
 						$He posts plenty of snapshots of gravid mothers-to-be. But with no belly bump of $his own to feature, the impact is no different from any preggo porn already floating around the net.
diff --git a/src/utility/descriptionWidgetsFlesh.tw b/src/utility/descriptionWidgetsFlesh.tw
index dd235d6a7d2..f6ba5f14ac4 100644
--- a/src/utility/descriptionWidgetsFlesh.tw
+++ b/src/utility/descriptionWidgetsFlesh.tw
@@ -4611,7 +4611,6 @@ $He has
 
 <<widget "BellyDescription">>
 
-<<set $bellyAccessory = $activeSlave.bellyAccessory>>
 <<if $activeSlave.belly >= 30000>>
 	<<if ($activeSlave.belly >= 400000+($activeSlave.muscles*2000) && $activeSlave.physicalAge >= 18)>>
 		<<set _heavyBelly = 1>>
@@ -15647,7 +15646,7 @@ $He has
 <</if>> /* closes show clothing */
 
 <<if $activeSlave.fuckdoll == 0>>
-	<<if setup.fakeBellies.includes($bellyAccessory)>>
+	<<if setup.fakeBellies.includes($activeSlave.bellyAccessory)>>
 		<<switch $activeSlave.bellyAccessory>>
 		<<case "a huge empathy belly">>
 			$He is wearing a carefully sculpted silicone belly modeled after a full-term pregnant woman carrying twins.
diff --git a/src/utility/descriptionWidgetsPiercings.tw b/src/utility/descriptionWidgetsPiercings.tw
index 91e83e21e86..75f27373d8a 100644
--- a/src/utility/descriptionWidgetsPiercings.tw
+++ b/src/utility/descriptionWidgetsPiercings.tw
@@ -239,7 +239,7 @@
 
 <<widget "navelPiercingDescription">>
 	<<if $activeSlave.fuckdoll == 0>>
-		<<if setup.fakeBellies.includes($bellyAccessory)>>
+		<<if setup.fakeBellies.includes($activeSlave.bellyAccessory)>>
 			<<if $activeSlave.navelPiercing == 1>>
 				$His fake navel bears a simple stud.
 			<<elseif $activeSlave.navelPiercing == 2>>
-- 
GitLab