From cde663c1e391c5982605026e4157326ff64ae5a8 Mon Sep 17 00:00:00 2001
From: Blank <blank@national.shitposting.agency>
Date: Thu, 2 May 2019 16:59:30 -0700
Subject: [PATCH] Story caption rewrite - 0.

---
 src/uncategorized/storyCaption.tw | 1437 +++++++++++++++--------------
 1 file changed, 732 insertions(+), 705 deletions(-)

diff --git a/src/uncategorized/storyCaption.tw b/src/uncategorized/storyCaption.tw
index ea9eb4f0962..ed2c64b075b 100644
--- a/src/uncategorized/storyCaption.tw
+++ b/src/uncategorized/storyCaption.tw
@@ -1,390 +1,181 @@
-:: StoryCaption
-\
-<<set _Pass = passage()>>\
-<<if _Pass == "Encyclopedia">>\
-<span id="nextButton"><strong><<link [[($nextButton)|($nextLink)]]>><</link>> to Free Cities</strong></span>
-/* Intro, new players, PC/Gameplay focused */
-[[Playing Free Cities|Encyclopedia][$encyclopedia = "Playing Free Cities"]]
-[[Design your master|Encyclopedia][$encyclopedia = "Design Your Master"]]
-[[Being in charge|Encyclopedia][$encyclopedia = "Being in charge"]]
-/* Section for slaves */
-[[Slaves|Encyclopedia][$encyclopedia = "Slaves"]]
-[[Obtaining Slaves|Encyclopedia][$encyclopedia = "Obtaining Slaves"]]
-[[Slave Assignments|Encyclopedia][$encyclopedia = "Slave Assignments"]]
-[[Slave Body|Encyclopedia][$encyclopedia = "Body"]] / [[Skills|Encyclopedia][$encyclopedia = "Skills"]]
-[[Slave Fetishes|Encyclopedia][$encyclopedia = "Fetishes"]] / [[Quirks|Encyclopedia][$encyclopedia = "Quirks"]] / [[Flaws|Encyclopedia][$encyclopedia = "Flaws"]]
-[[Slave Relationships|Encyclopedia][$encyclopedia = "Relationships"]]
-/* Section for arcology and Lore */
-[[The X-Series Arcology|Encyclopedia][$encyclopedia = "What the Upgrades Do"]]
-[[Arcology Facilities|Encyclopedia][$encyclopedia = "Facilities"]]
-[[Terrain Types|Encyclopedia][$encyclopedia = "Terrain Types"]]
-[[Future Societies|Encyclopedia][$encyclopedia = "Future Societies"]]
-[[Lore|Encyclopedia][$encyclopedia = "Lore"]]
-/* Mods and extras */
-[[Game Mods|Encyclopedia][$encyclopedia = "Game Mods"]]
-[[Credits|Encyclopedia][$encyclopedia = "Credits"]]
+:: StoryCaption [nobr]
+
+<<set _Pass = passage()>>
+<<if _Pass == "Encyclopedia">>
+
+	<span id="nextButton"><strong><<link [[($nextButton)|($nextLink)]]>><</link>> to Free Cities</strong></span>
+	/* Intro, new players, PC/Gameplay focused */
+	[[Playing Free Cities|Encyclopedia][$encyclopedia = "Playing Free Cities"]]
+	[[Design your master|Encyclopedia][$encyclopedia = "Design Your Master"]]
+	[[Being in charge|Encyclopedia][$encyclopedia = "Being in charge"]]
+	/* Section for slaves */
+	[[Slaves|Encyclopedia][$encyclopedia = "Slaves"]]
+	[[Obtaining Slaves|Encyclopedia][$encyclopedia = "Obtaining Slaves"]]
+	[[Slave Assignments|Encyclopedia][$encyclopedia = "Slave Assignments"]]
+	[[Slave Body|Encyclopedia][$encyclopedia = "Body"]] / [[Skills|Encyclopedia][$encyclopedia = "Skills"]]
+	[[Slave Fetishes|Encyclopedia][$encyclopedia = "Fetishes"]] / [[Quirks|Encyclopedia][$encyclopedia = "Quirks"]] / [[Flaws|Encyclopedia][$encyclopedia = "Flaws"]]
+	[[Slave Relationships|Encyclopedia][$encyclopedia = "Relationships"]]
+	/* Section for arcology and Lore */
+	[[The X-Series Arcology|Encyclopedia][$encyclopedia = "What the Upgrades Do"]]
+	[[Arcology Facilities|Encyclopedia][$encyclopedia = "Facilities"]]
+	[[Terrain Types|Encyclopedia][$encyclopedia = "Terrain Types"]]
+	[[Future Societies|Encyclopedia][$encyclopedia = "Future Societies"]]
+	[[Lore|Encyclopedia][$encyclopedia = "Lore"]]
+	/* Mods and extras */
+	[[Game Mods|Encyclopedia][$encyclopedia = "Game Mods"]]
+	[[Credits|Encyclopedia][$encyclopedia = "Credits"]]
+
 <<elseif _Pass == "Starting Girls">>\
-<span id="cost"><<SlaveCostDescription>></span>
+	<span id="cost"><<SlaveCostDescription>></span>
 
-<<elseif $ui == "disclaimer">>\
+<<elseif $ui == "disclaimer">>
 	<span id="nextButton"><strong><<link [[($nextButton)|($nextLink)]]>><</link>></strong></span>
-<<elseif $ui != "start">>\
-<<nobr>>
-
-<<set _SL = $slaves.length>>
-<<if $cheatMode>>_Pass<br><</if>>
-<span id="week">''Week $week''</span>
-<br>Week of $month $day, $year
-<<if (_Pass == "Main") && ($cheatMode)&& ($cheatModeM)>>
-	<<set _TWeek = $week>>
-	<<textbox "$week" $week>>
-	<<link "Apply">>
-	<<set $week = Math.trunc(Number($week) || _TWeek)>>
-	<<if $week < 1>><<set $week = 1>><</if>>
-	<<replace "#week">>''Week $week''<</replace>>
-	<</link>>
-<</if>>
-<br>
-<<if $weatherToday.severity == 1>>
-	//@@.cyan;$weatherToday.name@@//
-<<elseif $weatherToday.severity == 2>>
-	//@@.yellow;$weatherToday.name@@//
-<<elseif $weatherToday.severity == 3>>
-	//@@.orange;$weatherToday.name@@//
-<<else>>
-	//@@.red;$weatherToday.name@@//
-<</if>>
-<br><br>
-<<if $nextButton == "END WEEK">>
-	<span id="endWeekButton"><strong><<link [[($nextButton)|($nextLink)]]>>
-		<<resetAssignmentFilter>> /* very important! */
-	<</link>></strong></span> @@.cyan;[Ent]@@
-	<<if $rulesError && $rulesAssistantAuto == 1>><br>@@.yellow; WARNING: some custom rules will change slave variables@@<</if>>
-<<else>>
-	<span id="nextButton"> /* target for miscWidgets' <<UpdateNextButton>> */
-		<strong><<link "$nextButton">> /* must use link so spacebar shortcut will work */
-			<<if $nextButton != " ">> /* but no effect if nextButton is set to a blank space */
-				<<set $ui = "main">>
-				<<goto $nextLink>>
-			<</if>>
-		<</link>></strong>
-		<<if $nextButton != " ">>@@.cyan;[Space]@@<</if>>
-	</span>
-<</if>>
-<br><br>
-<<if $newModelUI == 0>>
-	<<if _Pass == "Main">>
-		<span id="manageArcology">
-			<<link "Manage Arcology">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Arcology">><</link>>
-		</span> @@.cyan;[C]@@
-	<</if>>
-	<br>
-<</if>>
-<<set $cash = Math.trunc($cash)>>
-<span id="cash">
-	<<if $cash > 0>>
-		@@.yellowgreen;Cash@@
-	<<else>>
-		__@@.red;Cash@@__
-	<</if>>
-	| <<print cashFormat($cash)>>
-</span>
-<br>
-<<if _Pass == "Main">>
-	<<set _TCash2 = ($cash-$cashLastWeek)>>
-	<span id="oldcash">
-		<<if _TCash2 < 0>>
-			(@@.red;<<print cashFormat(_TCash2)>>@@
-		<<else>>
-			(@@.yellowgreen;+<<print cashFormat(_TCash2)>>@@
-		<</if>>
-	</span>
-	since last week)
-	<<if ($cheatMode) && ($cheatModeM)>>
-		<<set _TCash1 = $cash>>
-		<<textbox "$cash" $cash>>
+
+<<elseif $ui != "start">>
+
+	<<set _SL = $slaves.length>>
+	<<if $cheatMode>>_Pass<br><</if>>
+	<span id="week">''Week $week''</span>
+	<br>Week of $month $day, $year
+	<<if (_Pass == "Main") && ($cheatMode)&& ($cheatModeM)>>
+		<<set _TWeek = $week>>
+		<<textbox "$week" $week>>
 		<<link "Apply">>
-			<<set $cash = Math.trunc(Number($cash) || _TCash1), $cheater = 1>>
-			<<replace "#cash">>
-				<<if $cash > 0>>
-					@@.yellowgreen;Cash@@
-				<<else>>
-					__@@.red;Cash@@__
-				<</if>>
-				| <<print cashFormat($cash)>>
-			<</replace>>
-			<<set _TCash2 = ($cash-$cashLastWeek)>>
-			<<replace "#oldcash">>
-				<<if _TCash2 < 0>>
-					(@@.red;<<print cashFormat(_TCash2)>>@@
-				<<else>>
-					(@@.yellowgreen;+<<print cashFormat(_TCash2)>>@@
-				<</if>>
-			<</replace>>
-			since last week)
+		<<set $week = Math.trunc(Number($week) || _TWeek)>>
+		<<if $week < 1>><<set $week = 1>><</if>>
+		<<replace "#week">>''Week $week''<</replace>>
 		<</link>>
 	<</if>>
-
+	<<if $weatherToday.severity == 1>>
+		//@@.cyan;$weatherToday.name@@//
+	<<elseif $weatherToday.severity == 2>>
+		//@@.yellow;$weatherToday.name@@//
+	<<elseif $weatherToday.severity == 3>>
+		//@@.orange;$weatherToday.name@@//
+	<<else>>
+		//@@.red;$weatherToday.name@@//
+	<</if>>
 	<br>
-	<<if $foodMarket > 0>>
-		<<set $food = Math.trunc($food)>>
-		<<set $foodConsumption = (($lowerClass*$lowerRate) + ($middleClass*$middleRate) + ($upperClass*$upperRate) + ($topClass*$topRate))>>
-		<span id="food">
-			<<if $food > $foodConsumption>> /* if there is enough food for the next week */
-				@@.chocolate;Food@@
-			<<else>>
-				@@.red;Food@@
-			<</if>>
-			<<if $food < 0>>
-				<<set $food = 0>>
-			<</if>>
-			| <<print massFormat($food)>>
-		</span>
-
-		<br>
 
-		<<set _TFood2 = ($food-$foodLastWeek)>>
-		<span id="oldfood">
-			<<if _TFood2 < 0>>
-				(@@.red;<<print massFormat(_TFood2)>>@@
-			<<else>>
-				(@@.chocolate;+<<print massFormat(_TFood2)>>@@
-			<</if>>
-		</span>
-		since last week)
-		<<if ($cheatMode) && ($cheatModeM)>>
-			<<set _TFood1 = $food>>
-			<<textbox "$food" $food>>
-			<<link "Apply">>
-				<<if $food < 0>>
-					<<set $food = 0>>
-				<<else>>
-					<<set $food = Math.trunc(Number($food) || _TFood1), $cheater = 1>>
-				<</if>>
-				<<replace "#food">>
-					<<if $food > $foodConsumption>>		/* if there is enough food for the next week */
-						@@.chocolate;Food@@
-					<<else>>
-						__@@.red;Food@@__
-					<</if>>
-					| <<print massFormat($food)>>
-				<</replace>>
-				<<set _TFood2 = ($food-$foodLastWeek)>>
-				<<replace "#oldfood">>
-					<<if _TFood2 < 0>>
-						(@@.red;<<print massFormat(_TFood2)>>@@
-					<<else>>
-						(@@.chocolate;+<<print massFormat(_TFood2)>>@@
-					<</if>>
-				<</replace>>
-				since last week)
-			<</link>>
-		<</if>>
-	<</if>>
-	<br>[[Upkeep|Costs Budget]] |
-<<else>>
-	<<if $foodMarket > 0>>
-		<<set $food = Math.trunc($food)>>
-		<span id="food">
-			<<if $food > $foodConsumption>>		/* if there is enough food for the next week */
-				@@.chocolate;Food@@
-			<<else>>
-				@@.red;Food@@
-			<</if>>
-			| <<print massFormat($food)>>
-		</span>
+	<<if _Pass == "Main">>
+		[[Rep|Rep Budget]] |
 	<<else>>
-		<br>
+		@@.green;Rep@@ |
 	<</if>>
-	<br>Upkeep |
-<</if>><<print cashFormat($costs)>>
-<br><br>@@.pink;Total Sex Slaves@@ | <<print num(_SL)>>
-<br>@@.pink;Penthouse Beds@@ |
-<<if $dormitoryPopulation+$roomsPopulation > ($dormitory+$rooms)>>@@.red;<<print $dormitoryPopulation+$roomsPopulation>>@@<<else>><<print $dormitoryPopulation+$roomsPopulation>><</if>>/<<print ($dormitory+$rooms)>>
-<br>@@.pink;Dormitory Beds@@ | <<if $dormitoryPopulation > $dormitory>>@@.red;<<print $dormitoryPopulation>>@@<<else>><<print $dormitoryPopulation>><</if>>/<<print $dormitory>>
-<br>@@.pink;Luxury Rooms@@ | <<if $roomsPopulation > $rooms>>@@.red;<<print $roomsPopulation>>@@<<else>><<print $roomsPopulation>><</if>>/<<print $rooms>>
-<br>@@.yellowgreen;GSP@@ |
-<<print Math.trunc(0.1*$arcologies[0].prosperity)>>m
-<<if $arcologies[0].ownership >= $arcologies[0].minority>>
-	<<if $arcologies[0].ownership >= $arcologies[0].minority+5>>
-		<<if $arcologies[0].ownership < 100>>
-			<<if $assistantPower >= 1>> (@@.yellowgreen;<<print $arcologies[0].ownership>>%@@:<<print $arcologies[0].minority>>%) <<else>> (@@.yellowgreen;<<print $arcologies[0].ownership>>%@@) <</if>>
-		<<else>> (<<print $arcologies[0].ownership>>%)
-		<</if>>
+	<span id="rep">
+	<<if $rep > 19000>>
+		@@color:rgb(0,145,0);worshipped@@
+	<<elseif $rep > 18000>>
+		@@color:rgb(0,150,0);great@@
+	<<elseif $rep > 17000>>
+		@@color:rgb(0,155,0);exalted@@
+	<<elseif $rep > 16000>>
+		@@color:rgb(0,160,0);illustrious@@
+	<<elseif $rep > 15000>>
+		@@color:rgb(0,165,0);prestigious@@
+	<<elseif $rep > 14000>>
+		@@color:rgb(0,170,0);renowned@@
+	<<elseif $rep > 13000>>
+		@@color:rgb(0,175,0);famed@@
+	<<elseif $rep > 12000>>
+		@@color:rgb(0,180,0);celebrated@@
+	<<elseif $rep > 11000>>
+		@@color:rgb(0,185,0);honored@@
+	<<elseif $rep > 10000>>
+		@@color:rgb(0,190,0);acclaimed@@
+	<<elseif $rep > 9000>>
+		@@color:rgb(0,195,0);eminent@@
+	<<elseif $rep > 8250>>
+		@@color:rgb(0,200,0);prominent@@
+	<<elseif $rep > 7000>>
+		@@color:rgb(0,205,0);distinguished@@
+	<<elseif $rep > 6750>>
+		@@color:rgb(0,210,0);admired@@
+	<<elseif $rep > 6000>>
+		@@color:rgb(0,215,0);esteemed@@
+	<<elseif $rep > 5250>>
+		@@color:rgb(0,220,0);respected@@
+	<<elseif $rep > 4500>>
+		@@color:rgb(0,225,0);known@@
+	<<elseif $rep > 3750>>
+		@@color:rgb(0,230,0);recognized@@
+	<<elseif $rep > 3000>>
+		@@color:rgb(0,235,0);rumored@@
+	<<elseif $rep > 2250>>
+		@@color:rgb(0,240,0);envied@@
+	<<elseif $rep > 1500>>
+		@@color:rgb(0,245,0);resented@@
+	<<elseif $rep > 750>>
+		@@color:rgb(0,250,0);disliked@@
 	<<else>>
-		<<if $assistantPower >= 1>> (@@.yellow;<<print $arcologies[0].ownership>>%@@:<<print $arcologies[0].minority>>%) <<else>> (@@.yellow;<<print $arcologies[0].ownership>>%@@) <</if>>
+		@@color:rgb(0,255,0);unknown@@
 	<</if>>
-<<else>>
-	<<if $assistantPower >= 1>> (@@.red;<<print $arcologies[0].ownership>>%@@:<<print $arcologies[0].minority>>%) <<else>> (@@.red;<<print $arcologies[0].ownership>>%@@) <</if>>
-<</if>>
-<<if _Pass == "Main">>
-	<br>[[Rep|Rep Budget]] |
-<<else>>
-	<br>@@.green;Rep@@ |
-<</if>>
-<span id="rep">
-<<if $rep > 19000>>
-	@@color:rgb(0,145,0);worshipped@@
-<<elseif $rep > 18000>>
-	@@color:rgb(0,150,0);great@@
-<<elseif $rep > 17000>>
-	@@color:rgb(0,155,0);exalted@@
-<<elseif $rep > 16000>>
-	@@color:rgb(0,160,0);illustrious@@
-<<elseif $rep > 15000>>
-	@@color:rgb(0,165,0);prestigious@@
-<<elseif $rep > 14000>>
-	@@color:rgb(0,170,0);renowned@@
-<<elseif $rep > 13000>>
-	@@color:rgb(0,175,0);famed@@
-<<elseif $rep > 12000>>
-	@@color:rgb(0,180,0);celebrated@@
-<<elseif $rep > 11000>>
-	@@color:rgb(0,185,0);honored@@
-<<elseif $rep > 10000>>
-	@@color:rgb(0,190,0);acclaimed@@
-<<elseif $rep > 9000>>
-	@@color:rgb(0,195,0);eminent@@
-<<elseif $rep > 8250>>
-	@@color:rgb(0,200,0);prominent@@
-<<elseif $rep > 7000>>
-	@@color:rgb(0,205,0);distinguished@@
-<<elseif $rep > 6750>>
-	@@color:rgb(0,210,0);admired@@
-<<elseif $rep > 6000>>
-	@@color:rgb(0,215,0);esteemed@@
-<<elseif $rep > 5250>>
-	@@color:rgb(0,220,0);respected@@
-<<elseif $rep > 4500>>
-	@@color:rgb(0,225,0);known@@
-<<elseif $rep > 3750>>
-	@@color:rgb(0,230,0);recognized@@
-<<elseif $rep > 3000>>
-	@@color:rgb(0,235,0);rumored@@
-<<elseif $rep > 2250>>
-	@@color:rgb(0,240,0);envied@@
-<<elseif $rep > 1500>>
-	@@color:rgb(0,245,0);resented@@
-<<elseif $rep > 750>>
-	@@color:rgb(0,250,0);disliked@@
-<<else>>
-	@@color:rgb(0,255,0);unknown@@
-<</if>>
-(<<print num($rep)>>)
-</span>
-<<if (_Pass == "Main")>>
-	<<if ($cheatMode) && ($cheatModeM)>>
-		<<set _TRep = $rep>>
-		<<textbox "$rep" $rep>>
-		<<link "Apply">>
-		<<set $rep = Math.clamp(Math.trunc(Number($rep) || _TRep), 0, 20000), $cheater = 1>>
-		<<replace "#rep">>
-		<<if $rep > 19000>>
-			@@color:rgb(0,145,0);worshipped@@
-		<<elseif $rep > 18000>>
-			@@color:rgb(0,150,0);great@@
-		<<elseif $rep > 17000>>
-			@@color:rgb(0,155,0);exalted@@
-		<<elseif $rep > 16000>>
-			@@color:rgb(0,160,0);illustrious@@
-		<<elseif $rep > 15000>>
-			@@color:rgb(0,165,0);prestigious@@
-		<<elseif $rep > 14000>>
-			@@color:rgb(0,170,0);renowned@@
-		<<elseif $rep > 13000>>
-			@@color:rgb(0,175,0);famed@@
-		<<elseif $rep > 12000>>
-			@@color:rgb(0,180,0);celebrated@@
-		<<elseif $rep > 11000>>
-			@@color:rgb(0,185,0);honored@@
-		<<elseif $rep > 10000>>
-			@@color:rgb(0,190,0);acclaimed@@
-		<<elseif $rep > 9000>>
-			@@color:rgb(0,195,0);eminent@@
-		<<elseif $rep > 8250>>
-			@@color:rgb(0,200,0);prominent@@
-		<<elseif $rep > 7000>>
-			@@color:rgb(0,205,0);distinguished@@
-		<<elseif $rep > 6750>>
-			@@color:rgb(0,210,0);admired@@
-		<<elseif $rep > 6000>>
-			@@color:rgb(0,215,0);esteemed@@
-		<<elseif $rep > 5250>>
-			@@color:rgb(0,220,0);respected@@
-		<<elseif $rep > 4500>>
-			@@color:rgb(0,225,0);known@@
-		<<elseif $rep > 3750>>
-			@@color:rgb(0,230,0);recognized@@
-		<<elseif $rep > 3000>>
-			@@color:rgb(0,235,0);rumored@@
-		<<elseif $rep > 2250>>
-			@@color:rgb(0,240,0);envied@@
-		<<elseif $rep > 1500>>
-			@@color:rgb(0,245,0);resented@@
-		<<elseif $rep > 750>>
-			@@color:rgb(0,250,0);disliked@@
-		<<else>>
-			@@color:rgb(0,255,0);unknown@@
+	(<<print num($rep)>>)
+	</span>
+	<<if (_Pass == "Main")>>
+		<<if ($cheatMode) && ($cheatModeM)>>
+			<<set _TRep = $rep>>
+			<<textbox "$rep" $rep>>
+			<<link "Apply">>
+			<<set $rep = Math.clamp(Math.trunc(Number($rep) || _TRep), 0, 20000), $cheater = 1>>
+			<<replace "#rep">>
+			<<if $rep > 19000>>
+				@@color:rgb(0,145,0);worshipped@@
+			<<elseif $rep > 18000>>
+				@@color:rgb(0,150,0);great@@
+			<<elseif $rep > 17000>>
+				@@color:rgb(0,155,0);exalted@@
+			<<elseif $rep > 16000>>
+				@@color:rgb(0,160,0);illustrious@@
+			<<elseif $rep > 15000>>
+				@@color:rgb(0,165,0);prestigious@@
+			<<elseif $rep > 14000>>
+				@@color:rgb(0,170,0);renowned@@
+			<<elseif $rep > 13000>>
+				@@color:rgb(0,175,0);famed@@
+			<<elseif $rep > 12000>>
+				@@color:rgb(0,180,0);celebrated@@
+			<<elseif $rep > 11000>>
+				@@color:rgb(0,185,0);honored@@
+			<<elseif $rep > 10000>>
+				@@color:rgb(0,190,0);acclaimed@@
+			<<elseif $rep > 9000>>
+				@@color:rgb(0,195,0);eminent@@
+			<<elseif $rep > 8250>>
+				@@color:rgb(0,200,0);prominent@@
+			<<elseif $rep > 7000>>
+				@@color:rgb(0,205,0);distinguished@@
+			<<elseif $rep > 6750>>
+				@@color:rgb(0,210,0);admired@@
+			<<elseif $rep > 6000>>
+				@@color:rgb(0,215,0);esteemed@@
+			<<elseif $rep > 5250>>
+				@@color:rgb(0,220,0);respected@@
+			<<elseif $rep > 4500>>
+				@@color:rgb(0,225,0);known@@
+			<<elseif $rep > 3750>>
+				@@color:rgb(0,230,0);recognized@@
+			<<elseif $rep > 3000>>
+				@@color:rgb(0,235,0);rumored@@
+			<<elseif $rep > 2250>>
+				@@color:rgb(0,240,0);envied@@
+			<<elseif $rep > 1500>>
+				@@color:rgb(0,245,0);resented@@
+			<<elseif $rep > 750>>
+				@@color:rgb(0,250,0);disliked@@
+			<<else>>
+				@@color:rgb(0,255,0);unknown@@
+			<</if>>
+			($rep)
+			<</replace>>
+			<</link>>
 		<</if>>
-		($rep)
-		<</replace>>
-		<</link>>
 	<</if>>
-<</if>>
-<<if $secExp == 1>>
-<br>@@.darkviolet;Auth@@ |
-<<set $authority = Math.clamp(Math.trunc($authority), 0, 20000)>>
-<span id="auth">
-<<if $authority > 19500>>
-	@@color:rgb(148, 0, 211);divine will@@
-<<elseif $authority > 19000>>
-	@@color:rgb(148, 0, 211);sovereign@@
-<<elseif $authority > 18000>>
-	@@color:rgb(148, 0, 211);monarch@@
-<<elseif $authority > 17000>>
-	@@color:rgb(148, 0, 211);tyrant@@
-<<elseif $authority > 15000>>
-	@@color:rgb(148, 0, 211);dictator@@
-<<elseif $authority > 14000>>
-	@@color:rgb(148, 0, 211);prince@@
-<<elseif $authority > 13000>>
-	@@color:rgb(183, 0, 211);master@@
-<<elseif $authority > 12000>>
-	@@color:rgb(183, 0, 211);leader@@
-<<elseif $authority > 11000>>
-	@@color:rgb(183, 0, 211);director@@
-<<elseif $authority > 10000>>
-	@@color:rgb(183, 0, 211);overseer@@
-<<elseif $authority > 9000>>
-	@@color:rgb(183, 0, 211);chief@@
-<<elseif $authority > 8000>>
-	@@color:rgb(183, 0, 211);manager@@
-<<elseif $authority > 7000>>
-	@@color:rgb(211,0,204);principal@@
-<<elseif $authority > 6000>>
-	@@color:rgb(211,0,204);auxiliary@@
-<<elseif $authority > 5000>>
-	@@color:rgb(211,0,204);subordinate@@
-<<elseif $authority > 4000>>
-	@@color:rgb(211,0,204);follower@@
-<<elseif $authority > 3000>>
-	@@color:rgb(211,0,204);powerless@@
-<<elseif $authority > 2000>>
-	@@color:rgb(211,0,204);toothless@@
-<<elseif $authority > 1000>>
-	@@color:rgb(211,0,204);mostly harmless@@
-<<else>>
-	@@color:rgb(211,0,204);harmless@@
-<</if>>
-(<<print num($authority)>>)
-</span>
-<<if (_Pass == "Main")>>
-	<<if ($cheatMode) && ($cheatModeM)>>
-		<<set _TAuth = $authority>>
-		<<textbox "$authority" $authority>>
-		<<link "Apply">>
-		<<set $authority = Math.clamp(Math.trunc(Number($authority) || _TAuth), 0, 20000), $cheater = 1>>
-		<<replace "#auth">>
+
+	<<if $secExp == 1>>
+		<br>@@.darkviolet;Auth@@ |
+		<<set $authority = Math.clamp(Math.trunc($authority), 0, 20000)>>
+		<span id="auth">
 		<<if $authority > 19500>>
 			@@color:rgb(148, 0, 211);divine will@@
 		<<elseif $authority > 19000>>
@@ -426,395 +217,634 @@
 		<<else>>
 			@@color:rgb(211,0,204);harmless@@
 		<</if>>
-		($authority)
-		<</replace>>
-		<</link>>
-	<</if>>
-<</if>>
-<span id="sec">
-<br>@@.deepskyblue;Security@@ | @@.deepskyblue;<<print Math.trunc($security)>>%@@
-</span>
-<<if (_Pass == "Main")>>
-	<<if ($cheatMode) && ($cheatModeM)>>
-		<<set _TSec = $security>>
-		<<textbox "$security" $security>>
-		<<link "Apply">>
-		<<set $security = Math.clamp(Math.trunc(Number($security) || _TSec), 0, 100), $cheater = 1>>
-		<<replace "#sec">>
-		<br>@@.deepskyblue;Security@@ | <<print Math.trunc($security)>>%
-		<</replace>>
-		<</link>>
-	<</if>>
-<</if>>
-<span id="crime">
-<br>@@.orangered;Crime@@ | @@.orangered;<<print Math.trunc($crime)>>%@@
-</span>
-<<if (_Pass == "Main")>>
-	<<if ($cheatMode) && ($cheatModeM)>>
-		<<set _TCrime = $crime>>
-		<<textbox "$crime" $crime>>
-		<<link "Apply">>
-		<<set $crime = Math.clamp(Math.trunc(Number($crime) || _TCrime), 0, 100), $cheater = 1>>
-		<<replace "#crime">>
-		<br>@@.orangered;Crime@@ | <<print Math.trunc($crime)>>%
-		<</replace>>
-		<</link>>
-	<</if>>
-	<br>
-<</if>>
-<</if>>
-<<if (_Pass == "Main")>>
-	<<if $newModelUI == 0>>
-		<<if ($HGSuite)>>
-			<br> <<link "$HGSuiteNameCaps""Head Girl Suite">><</link>>
-			<<if $abbreviateSidebar == 2>>
-				<<if $HeadGirl != 0>>(HG<<if $HGSuiteSlaves > 0>>, 1)<<else>>)<</if>><</if>>
-			<<else>>
-				<<if $HeadGirl != 0>>(HG<<if $HGSuiteSlaves > 0>> and slave<<else>>)<</if>><</if>>
+		(<<print num($authority)>>)
+		</span>
+		<<if (_Pass == "Main")>>
+			<<if ($cheatMode) && ($cheatModeM)>>
+				<<set _TAuth = $authority>>
+				<<textbox "$authority" $authority>>
+				<<link "Apply">>
+				<<set $authority = Math.clamp(Math.trunc(Number($authority) || _TAuth), 0, 20000), $cheater = 1>>
+				<<replace "#auth">>
+				<<if $authority > 19500>>
+					@@color:rgb(148, 0, 211);divine will@@
+				<<elseif $authority > 19000>>
+					@@color:rgb(148, 0, 211);sovereign@@
+				<<elseif $authority > 18000>>
+					@@color:rgb(148, 0, 211);monarch@@
+				<<elseif $authority > 17000>>
+					@@color:rgb(148, 0, 211);tyrant@@
+				<<elseif $authority > 15000>>
+					@@color:rgb(148, 0, 211);dictator@@
+				<<elseif $authority > 14000>>
+					@@color:rgb(148, 0, 211);prince@@
+				<<elseif $authority > 13000>>
+					@@color:rgb(183, 0, 211);master@@
+				<<elseif $authority > 12000>>
+					@@color:rgb(183, 0, 211);leader@@
+				<<elseif $authority > 11000>>
+					@@color:rgb(183, 0, 211);director@@
+				<<elseif $authority > 10000>>
+					@@color:rgb(183, 0, 211);overseer@@
+				<<elseif $authority > 9000>>
+					@@color:rgb(183, 0, 211);chief@@
+				<<elseif $authority > 8000>>
+					@@color:rgb(183, 0, 211);manager@@
+				<<elseif $authority > 7000>>
+					@@color:rgb(211,0,204);principal@@
+				<<elseif $authority > 6000>>
+					@@color:rgb(211,0,204);auxiliary@@
+				<<elseif $authority > 5000>>
+					@@color:rgb(211,0,204);subordinate@@
+				<<elseif $authority > 4000>>
+					@@color:rgb(211,0,204);follower@@
+				<<elseif $authority > 3000>>
+					@@color:rgb(211,0,204);powerless@@
+				<<elseif $authority > 2000>>
+					@@color:rgb(211,0,204);toothless@@
+				<<elseif $authority > 1000>>
+					@@color:rgb(211,0,204);mostly harmless@@
+				<<else>>
+					@@color:rgb(211,0,204);harmless@@
+				<</if>>
+				($authority)
+				<</replace>>
+				<</link>>
 			<</if>>
 		<</if>>
-		<<if ($dojo > 1)>>
-			<br>[[Armory|BG Select]]
-			<<if $Bodyguard != 0>>
-				(BG)
+		<span id="sec">
+		<br>@@.deepskyblue;Security@@ | @@.deepskyblue;<<print Math.trunc($security)>>%@@
+		</span>
+		<<if (_Pass == "Main")>>
+			<<if ($cheatMode) && ($cheatModeM)>>
+				<<set _TSec = $security>>
+				<<textbox "$security" $security>>
+				<<link "Apply">>
+				<<set $security = Math.clamp(Math.trunc(Number($security) || _TSec), 0, 100), $cheater = 1>>
+				<<replace "#sec">>
+				<br>@@.deepskyblue;Security@@ | <<print Math.trunc($security)>>%
+				<</replace>>
+				<</link>>
 			<</if>>
 		<</if>>
-		<<if ($brothel)>>
-			<br> <<link "$brothelNameCaps""Brothel">><</link>>
-			<<if $abbreviateSidebar == 2>>
-				($brothelSlaves/<<print $brothel>> whores<<if $Madam>>, madam<</if>>)
-			<<else>>
-				($brothelSlaves/<<print $brothel>><<if $Madam>>, L<</if>>)
+		<span id="crime">
+		<br>@@.orangered;Crime@@ | @@.orangered;<<print Math.trunc($crime)>>%@@
+		</span>
+		<<if (_Pass == "Main")>>
+			<<if ($cheatMode) && ($cheatModeM)>>
+				<<set _TCrime = $crime>>
+				<<textbox "$crime" $crime>>
+				<<link "Apply">>
+				<<set $crime = Math.clamp(Math.trunc(Number($crime) || _TCrime), 0, 100), $cheater = 1>>
+				<<replace "#crime">>
+				<br>@@.orangered;Crime@@ | <<print Math.trunc($crime)>>%
+				<</replace>>
+				<</link>>
 			<</if>>
 		<</if>>
-		<<if ($club)>>
-			<br> <<link "$clubNameCaps""Club">><</link>>
-			<<if $abbreviateSidebar == 2>>
-				($clubSlaves/<<print $club>> sluts<<if $DJ>>, DJ<</if>>)
-			<<else>>
-				($clubSlaves/<<print $club>><<if $DJ>>, L<</if>>)
+	<</if>>
+
+	<br>
+	@@.yellowgreen;GSP@@
+	<<print Math.trunc(0.1*$arcologies[0].prosperity)>>m
+	<<if $arcologies[0].ownership >= $arcologies[0].minority>>
+		<<if $arcologies[0].ownership >= $arcologies[0].minority+5>>
+			<<if $arcologies[0].ownership < 100>>
+				<<if $assistantPower >= 1>> (@@.yellowgreen;<<print $arcologies[0].ownership>>%@@:<<print $arcologies[0].minority>>%) <<else>> (@@.yellowgreen;<<print $arcologies[0].ownership>>%@@) <</if>>
+			<<else>> (<<print $arcologies[0].ownership>>%)
 			<</if>>
+		<<else>>
+			<<if $assistantPower >= 1>> (@@.yellow;<<print $arcologies[0].ownership>>%@@:<<print $arcologies[0].minority>>%) <<else>> (@@.yellow;<<print $arcologies[0].ownership>>%@@) <</if>>
 		<</if>>
-		<<if ($arcade)>>
-			<br> <<link "$arcadeNameCaps""Arcade">><</link>>
-			<<if $abbreviateSidebar == 2>>
-				($arcadeSlaves/<<print $arcade>> inmates)
-			<<else>>
-				($arcadeSlaves/<<print $arcade>>)
-			<</if>>
+	<<else>>
+		<<if $assistantPower >= 1>> (@@.red;<<print $arcologies[0].ownership>>%@@:<<print $arcologies[0].minority>>%) <<else>> (@@.red;<<print $arcologies[0].ownership>>%@@) <</if>>
+	<</if>>
+	<br>
+
+	<<set $cash = Math.trunc($cash)>>
+	<span id="cash">
+	<<if $cash > 0>>
+		@@.yellowgreen;Cash@@
+	<<else>>
+		__@@.red;Cash@@__
+	<</if>>
+	| <<print cashFormat($cash)>>
+	</span>
+	<br>
+	<<if _Pass == "Main">>
+		<<set _TCash2 = ($cash-$cashLastWeek)>>
+		<span id="oldcash">
+		<<if _TCash2 < 0>>
+			(@@.red;<<print cashFormat(_TCash2)>>@@
+		<<else>>
+			(@@.yellowgreen;+<<print cashFormat(_TCash2)>>@@
 		<</if>>
-		<<if ($dairy)>>
-			<br> <<link "$dairyNameCaps""Dairy">><</link>>
-			<<set _SCapT9 = $bioreactorsXY+$bioreactorsXX+$bioreactorsHerm+$bioreactorsBarren>>
-			<<if $abbreviateSidebar == 2>>
-				($dairySlaves<<if _SCapT9>>+_SCapT9<</if>>/<<print $dairy>> cows<<if $Milkmaid>>, milkmaid<</if>>)
+		</span>
+		since last week)
+		<<if ($cheatMode) && ($cheatModeM)>>
+			<<set _TCash1 = $cash>>
+			<<textbox "$cash" $cash>>
+			<<link "Apply">>
+			<<set $cash = Math.trunc(Number($cash) || _TCash1), $cheater = 1>>
+			<<replace "#cash">>
+			<<if $cash > 0>>
+				@@.yellowgreen;Cash@@
 			<<else>>
-				($dairySlaves<<if _SCapT9>>+_SCapT9<</if>>/<<print $dairy>><<if $Milkmaid>>, L<</if>>)
+				__@@.red;Cash@@__
 			<</if>>
-		<</if>>
-		<<if ($farmyard)>>
-			<br> <<link "$farmyardNameCaps""Farmyard">><</link>>
-			<<if $abbreviateSidebar == 2>>
-				($farmyardSlaves/$farmyard farmhands<<if $Farmer>>, farmer<</if>>)
+			| <<print cashFormat($cash)>>
+			<</replace>>
+			<<set _TCash2 = ($cash-$cashLastWeek)>>
+			<<replace "#oldcash">>
+			<<if _TCash2 < 0>>
+				(@@.red;<<print cashFormat(_TCash2)>>@@
 			<<else>>
-				($farmyardSlaves/$farmyard<<if $Farmer>>, L<</if>>)
+				(@@.yellowgreen;+<<print cashFormat(_TCash2)>>@@
 			<</if>>
+			<</replace>>
+			since last week)
+			<</link>>
 		<</if>>
-		<<if ($servantsQuarters)>>
-			<br> <<link "$servantsQuartersNameCaps""Servants' Quarters">><</link>>
-			<<if $abbreviateSidebar == 2>>
-				($servantsQuartersSlaves/$servantsQuarters servants<<if $Stewardess>>, stewardess<</if>>)
+
+		<<if $foodMarket > 0>> <br>
+			<<set $food = Math.trunc($food)>>
+			<<set $foodConsumption = (($lowerClass*$lowerRate) + ($middleClass*$middleRate) + ($upperClass*$upperRate) + ($topClass*$topRate))>>
+			<span id="food">
+			<<if $food > $foodConsumption>> /* if there is enough food for the next week */
+				@@.chocolate;Food@@
 			<<else>>
-				($servantsQuartersSlaves/$servantsQuarters<<if $Stewardess>>, L<</if>>)
+				@@.red;Food@@
 			<</if>>
-		<</if>>
-		<<if ($masterSuite)>>
-			<br> <<link "$masterSuiteNameCaps""Master Suite">><</link>>
-			<<if $abbreviateSidebar == 2>>
-				($masterSuiteSlaves/$masterSuite <<if $masterSuiteSlaves != 1>>fucktoys<<else>>fucktoy<</if>><<if $Concubine>>, Concubine<</if>>)
-			<<else>>
-				($masterSuiteSlaves/$masterSuite<<if $Concubine>>, C<</if>>)
+			<<if $food < 0>>
+				<<set $food = 0>>
 			<</if>>
-		<</if>>
-		<<if ($schoolroom)>>
-			<br> <<link "$schoolroomNameCaps""Schoolroom">><</link>>
-			<<if $abbreviateSidebar == 2>>
-				($schoolroomSlaves/$schoolroom <<if $schoolroomSlaves != 1>>students<<else>>student<</if>><<if $Schoolteacher>>, schoolteacher<</if>>)
+			| <<print massFormat($food)>>
+			</span>
+
+			<br>
+
+			<<set _TFood2 = ($food-$foodLastWeek)>>
+			<span id="oldfood">
+			<<if _TFood2 < 0>>
+				(@@.red;<<print massFormat(_TFood2)>>@@
 			<<else>>
-				($schoolroomSlaves/$schoolroom<<if $Schoolteacher>>, L<</if>>)
+				(@@.chocolate;+<<print massFormat(_TFood2)>>@@
 			<</if>>
-		<</if>>
-		<<if ($spa)>>
-			<br> <<link "$spaNameCaps""Spa">><</link>>
-			<<if $abbreviateSidebar == 2>>
-				($spaSlaves/$spa <<if $spaSlaves != 1>>bathers<<else>>bathing<</if>><<if $Attendant>>, attendant<</if>>)
-			<<else>>
-				($spaSlaves/$spa<<if $Attendant>>, L<</if>>)
+			</span>
+			since last week)
+			<<if ($cheatMode) && ($cheatModeM)>>
+				<<set _TFood1 = $food>>
+				<<textbox "$food" $food>>
+				<<link "Apply">>
+				<<if $food < 0>>
+					<<set $food = 0>>
+				<<else>>
+					<<set $food = Math.trunc(Number($food) || _TFood1), $cheater = 1>>
+				<</if>>
+				<<replace "#food">>
+				<<if $food > $foodConsumption>>		/* if there is enough food for the next week */
+					@@.chocolate;Food@@
+				<<else>>
+					__@@.red;Food@@__
+				<</if>>
+				| <<print massFormat($food)>>
+				<</replace>>
+				<<set _TFood2 = ($food-$foodLastWeek)>>
+				<<replace "#oldfood">>
+				<<if _TFood2 < 0>>
+					(@@.red;<<print massFormat(_TFood2)>>@@
+				<<else>>
+					(@@.chocolate;+<<print massFormat(_TFood2)>>@@
+				<</if>>
+				<</replace>>
+				since last week)
+				<</link>>
 			<</if>>
 		<</if>>
-		<<if ($nursery)>>
-			<br> <<link "$nurseryNameCaps""Nursery">><</link>>
-			<<if $abbreviateSidebar == 2>>
-				(<<if $nursery-$nurseryBabies == 0>>No empty rooms<<elseif $nursery-$nurseryBabies == 1>>1 empty room<<else>><<print $nursery-$nurseryBabies>> empty rooms<</if>>, $nurserySlaves/$nurseryNannies <<if $nurserySlaves != 1>>nannies<<else>>nanny<</if>><<if $Matron>>, attendant<</if>>)
+		<br>[[Upkeep|Costs Budget]] |
+	<<else>>
+		<<if $foodMarket > 0>>
+			<<set $food = Math.trunc($food)>>
+			<span id="food">
+			<<if $food > $foodConsumption>>		/* if there is enough food for the next week */
+				@@.chocolate;Food@@
 			<<else>>
-				($nurseryBabies/$nursery, $nurserySlaves/$nurseryNannies<<if $Matron>>, L<</if>>)
+				@@.red;Food@@
 			<</if>>
+			| <<print massFormat($food)>>
+			</span>
 		<</if>>
-		<<if ($clinic)>>
-			<br> <<link "$clinicNameCaps""Clinic">><</link>>
-			<<if $abbreviateSidebar == 2>>
-				($clinicSlaves/$clinic <<if $clinicSlaves != 1>>patients<<else>>patient<</if>><<if $Nurse>>, nurse<</if>>)
-			<<else>>
-				($clinicSlaves/$clinic<<if $Nurse>>, L<</if>>)
-			<</if>>
+		Upkeep |
+	<</if>>
+	<<print cashFormat($costs)>>
+
+	<<if $nextButton == "END WEEK">> <br>
+		<span id="endWeekButton"> <strong>
+		<<link [[($nextButton)|($nextLink)]]>>
+			<<resetAssignmentFilter>> /* very important! */
+		<</link>>
+		</strong> </span> @@.cyan;[Ent]@@
+		<<if $rulesError && $rulesAssistantAuto == 1>>
+			<br>@@.yellow; WARNING: some custom rules will change slave variables@@
 		<</if>>
-		<<if ($cellblock)>>
-			<br> <<link "$cellblockNameCaps""Cellblock">><</link>>
-			<<if $abbreviateSidebar == 2>>
-				($cellblockSlaves/$cellblock <<if $cellblockSlaves != 1>>prisoners<<else>>prisoner<</if>><<if $Wardeness>>, wardeness<</if>>)
-			<<else>>
-				($cellblockSlaves/$cellblock<<if $Wardeness>>, L<</if>>)
-			<</if>>
+	<<elseif $nextButton !== " ">> <br>
+		<span id="nextButton"> /* target for miscWidgets' <<UpdateNextButton>> */
+			<strong><<link "$nextButton">> /* must use link so spacebar shortcut will work */
+					<<set $ui = "main">> 
+					<<goto $nextLink>>
+			<</link>></strong>
+			@@.cyan;[Space]@@
+		</span>
+	<</if>>
+
+	<br><br>@@.pink;Total Sex Slaves@@ | <<print num(_SL)>>
+	<br>@@.pink;Penthouse Beds@@ |
+	<<if $dormitoryPopulation+$roomsPopulation > ($dormitory+$rooms)>>@@.red;<<print $dormitoryPopulation+$roomsPopulation>>@@<<else>><<print $dormitoryPopulation+$roomsPopulation>><</if>>/<<print ($dormitory+$rooms)>>
+	<br>@@.pink;Dormitory Beds@@ | <<if $dormitoryPopulation > $dormitory>>@@.red;<<print $dormitoryPopulation>>@@<<else>><<print $dormitoryPopulation>><</if>>/<<print $dormitory>>
+	<br>@@.pink;Luxury Rooms@@ | <<if $roomsPopulation > $rooms>>@@.red;<<print $roomsPopulation>>@@<<else>><<print $roomsPopulation>><</if>>/<<print $rooms>>
+	<<if $nextButton !== " ">> <br><br> <</if>>
+
+	<<if $newModelUI === 0>>
+		<<if _Pass == "Main">>
+			<span id="manageArcology">
+			<<link "Manage Arcology">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Arcology">><</link>>
+		</span> @@.cyan;[C]@@
+		<br>
 		<</if>>
-		<<if ($incubator)>>
-			<br> <<link "$incubatorNameCaps""Incubator">><</link>>
-			<<if $abbreviateSidebar == 2>>
-				(<<if $incubator-$incubatorSlaves == 0>>No empty tanks<<elseif $incubator-$incubatorSlaves == 1>>1 empty tank<<else>><<print $incubator-$incubatorSlaves>> empty tanks<</if>>)
-			<<else>>
-				($incubatorSlaves/$incubator)
+	<</if>>
+
+	<<if (_Pass == "Main")>>
+		<<if $newModelUI == 0>>
+			<<if ($HGSuite)>>
+				<br> <<link "$HGSuiteNameCaps""Head Girl Suite">><</link>>
+				<<if $abbreviateSidebar == 2>>
+					<<if $HeadGirl != 0>>(HG<<if $HGSuiteSlaves > 0>>, 1)<<else>>)<</if>><</if>>
+				<<else>>
+					<<if $HeadGirl != 0>>(HG<<if $HGSuiteSlaves > 0>> and slave<<else>>)<</if>><</if>>
+				<</if>>
 			<</if>>
-		<</if>>
-		<<if ($pit)>>
-			<br> <<link "$pitNameCaps""Pit">><</link>>
-			<<set _SCapT = $fighterIDs.length>>
-			<<if $abbreviateSidebar == 2>>
-				(_SCapT <<if _SCapT != 1>>combatants<<else>>combatant<</if>>)
-			<<else>>
-				(_SCapT)
+			<<if ($dojo > 1)>>
+				<br>[[Armory|BG Select]]
+				<<if $Bodyguard != 0>>
+					(BG)
+				<</if>>
 			<</if>>
-		<</if>>
-		<br>
-		<<if $SF.Toggle && $SF.Active >= 1>>
+			<<if ($brothel)>>
+				<br> <<link "$brothelNameCaps""Brothel">><</link>>
+				<<if $abbreviateSidebar == 2>>
+					($brothelSlaves/<<print $brothel>> whores<<if $Madam>>, madam<</if>>)
+				<<else>>
+					($brothelSlaves/<<print $brothel>><<if $Madam>>, L<</if>>)
+				<</if>>
+			<</if>>
+
+			<<if ($club)>>
+				<br> <<link "$clubNameCaps""Club">><</link>>
+				<<if $abbreviateSidebar == 2>>
+					($clubSlaves/<<print $club>> sluts<<if $DJ>>, DJ<</if>>)
+				<<else>>
+					($clubSlaves/<<print $club>><<if $DJ>>, L<</if>>)
+				<</if>>
+			<</if>>
+			<<if ($arcade)>>
+				<br> <<link "$arcadeNameCaps""Arcade">><</link>>
+				<<if $abbreviateSidebar == 2>>
+					($arcadeSlaves/<<print $arcade>> inmates)
+				<<else>>
+					($arcadeSlaves/<<print $arcade>>)
+				<</if>>
+			<</if>>
+
+			<<if ($dairy)>>
+				<br> <<link "$dairyNameCaps""Dairy">><</link>>
+				<<set _SCapT9 = $bioreactorsXY+$bioreactorsXX+$bioreactorsHerm+$bioreactorsBarren>>
+				<<if $abbreviateSidebar == 2>>
+					($dairySlaves<<if _SCapT9>>+_SCapT9<</if>>/<<print $dairy>> cows<<if $Milkmaid>>, milkmaid<</if>>)
+				<<else>>
+					($dairySlaves<<if _SCapT9>>+_SCapT9<</if>>/<<print $dairy>><<if $Milkmaid>>, L<</if>>)
+				<</if>>
+			<</if>>
+			<<if ($farmyard)>>
+				<br> <<link "$farmyardNameCaps""Farmyard">><</link>>
+				<<if $abbreviateSidebar == 2>>
+					($farmyardSlaves/$farmyard farmhands<<if $Farmer>>, farmer<</if>>)
+				<<else>>
+					($farmyardSlaves/$farmyard<<if $Farmer>>, L<</if>>)
+				<</if>>
+			<</if>>
+
+			<<if ($servantsQuarters)>>
+				<br> <<link "$servantsQuartersNameCaps""Servants' Quarters">><</link>>
+				<<if $abbreviateSidebar == 2>>
+					($servantsQuartersSlaves/$servantsQuarters servants<<if $Stewardess>>, stewardess<</if>>)
+				<<else>>
+					($servantsQuartersSlaves/$servantsQuarters<<if $Stewardess>>, L<</if>>)
+				<</if>>
+			<</if>>
+			<<if ($masterSuite)>>
+				<br> <<link "$masterSuiteNameCaps""Master Suite">><</link>>
+				<<if $abbreviateSidebar == 2>>
+					($masterSuiteSlaves/$masterSuite <<if $masterSuiteSlaves != 1>>fucktoys<<else>>fucktoy<</if>><<if $Concubine>>, Concubine<</if>>)
+				<<else>>
+					($masterSuiteSlaves/$masterSuite<<if $Concubine>>, C<</if>>)
+				<</if>>
+			<</if>>
+
+			<<if ($schoolroom)>>
+				<br> <<link "$schoolroomNameCaps""Schoolroom">><</link>>
+				<<if $abbreviateSidebar == 2>>
+					($schoolroomSlaves/$schoolroom <<if $schoolroomSlaves != 1>>students<<else>>student<</if>><<if $Schoolteacher>>, schoolteacher<</if>>)
+				<<else>>
+					($schoolroomSlaves/$schoolroom<<if $Schoolteacher>>, L<</if>>)
+				<</if>>
+			<</if>>
+			<<if ($spa)>>
+				<br> <<link "$spaNameCaps""Spa">><</link>>
+				<<if $abbreviateSidebar == 2>>
+					($spaSlaves/$spa <<if $spaSlaves != 1>>bathers<<else>>bathing<</if>><<if $Attendant>>, attendant<</if>>)
+				<<else>>
+					($spaSlaves/$spa<<if $Attendant>>, L<</if>>)
+				<</if>>
+			<</if>>
+
+			<<if ($nursery)>>
+				<br> <<link "$nurseryNameCaps""Nursery">><</link>>
+				<<if $abbreviateSidebar == 2>>
+					(<<if $nursery-$nurseryBabies == 0>>No empty rooms<<elseif $nursery-$nurseryBabies == 1>>1 empty room<<else>><<print $nursery-$nurseryBabies>> empty rooms<</if>>, $nurserySlaves/$nurseryNannies <<if $nurserySlaves != 1>>nannies<<else>>nanny<</if>><<if $Matron>>, attendant<</if>>)
+				<<else>>
+					($nurseryBabies/$nursery, $nurserySlaves/$nurseryNannies<<if $Matron>>, L<</if>>)
+				<</if>>
+			<</if>>
+			<<if ($clinic)>>
+				<br> <<link "$clinicNameCaps""Clinic">><</link>>
+				<<if $abbreviateSidebar == 2>>
+					($clinicSlaves/$clinic <<if $clinicSlaves != 1>>patients<<else>>patient<</if>><<if $Nurse>>, nurse<</if>>)
+				<<else>>
+					($clinicSlaves/$clinic<<if $Nurse>>, L<</if>>)
+				<</if>>
+			<</if>>
+
+			<<if ($cellblock)>>
+				<br> <<link "$cellblockNameCaps""Cellblock">><</link>>
+				<<if $abbreviateSidebar == 2>>
+					($cellblockSlaves/$cellblock <<if $cellblockSlaves != 1>>prisoners<<else>>prisoner<</if>><<if $Wardeness>>, wardeness<</if>>)
+				<<else>>
+					($cellblockSlaves/$cellblock<<if $Wardeness>>, L<</if>>)
+				<</if>>
+			<</if>>
+			<<if ($incubator)>>
+				<br> <<link "$incubatorNameCaps""Incubator">><</link>>
+				<<if $abbreviateSidebar == 2>>
+					(<<if $incubator-$incubatorSlaves == 0>>No empty tanks<<elseif $incubator-$incubatorSlaves == 1>>1 empty tank<<else>><<print $incubator-$incubatorSlaves>> empty tanks<</if>>)
+				<<else>>
+					($incubatorSlaves/$incubator)
+				<</if>>
+			<</if>>
+
+			<<if ($pit)>>
+				<br> <<link "$pitNameCaps""Pit">><</link>>
+				<<set _SCapT = $fighterIDs.length>>
+				<<if $abbreviateSidebar == 2>>
+					(_SCapT <<if _SCapT != 1>>combatants<<else>>combatant<</if>>)
+				<<else>>
+					(_SCapT)
+				<</if>>
+				<br>
+			<</if>>
+
+			<<if $SF.Toggle && $SF.Active >= 1>>
+				<br>
+				<span id="SFMButton">
+					<<link "$SF.Caps's firebase""Firebase">><</link>>
+				</span> @@.cyan;[Z]@@
+			<</if>>
+
+		<<else>> /* $newModelUI > 0*/
+
+			<span id="manageArcology">
+				<<link "Manage Arcology">>
+					<<set $nextButton = "Back", $nextLink = _Pass>>
+					<<goto "Manage Arcology">>
+				<</link>>
+			</span> @@.cyan;[C]@@
 			<br>
-			<span id="SFMButton">
-				<<link "$SF.Caps's firebase""Firebase">><</link>>
-			</span> @@.cyan;[Z]@@
+			<span id="managePenthouse">
+				<<link "Manage Penthouse">>
+					<<set $nextButton = "Back", $nextLink = _Pass>>
+					<<goto "Manage Penthouse">>
+				<</link>>
+			</span> @@.cyan;[P]@@
+			<<if $corpAnnounced>>
+			<br>
+
+			<span id="manageCorporation">
+				<<link "Manage Corporation">>
+					<<set $nextButton = "Back", $nextLink = _Pass>>
+					<<goto "Manage Corporation">>
+				<</link>> @@.cyan;[Shift+C]@@
+			</span>
+			<</if>>
+			<br>
+			<span id="managePerson">
+				<<link "Manage Personal Affairs">>
+					<<set $nextButton = "Back", $nextLink = _Pass>>
+					<<goto "Manage Personal Affairs">>
+				<</link>>
+			</span> @@.cyan;[X]@@
+			<br>
+
+			<span id="PAOButton">
+				<<link [[Manage Personal Assistant|Personal assistant options]]>>
+				<</link>>
+			</span> @@.cyan;[T]@@
+			<<if $SF.Toggle && $SF.Active >= 1>>
+				<span id="SFMButton"> <br><br>
+					<<link "$SF.Caps's Firebase""Firebase">><</link>>
+				</span> @@.cyan;[Z]@@
+			<</if>>
+
 		<</if>>
-		<br>
-		<span id="optionsButton">
-			<<link "Game Options">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Options">><</link>>
-		</span> @@.cyan;[O]@@
-	<<else>>
-		<br>
-		<span id="manageArcology">
-			<<link "Manage Arcology">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Arcology">>
-			<</link>>
-		</span> @@.cyan;[C]@@
-		<br>
+
+	<<elseif _Pass == "Manage Arcology">>
+
+		<span id="Managesecurity">
 		<span id="managePenthouse">
-			<<link "Manage Penthouse">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Penthouse">>
+			<<link "Manage Penthouse">>
+				<<set $nextButton = "Back", $nextLink = _Pass>>
+				<<goto "Manage Penthouse">>
 			<</link>>
 		</span> @@.cyan;[P]@@
-		<<if $corpAnnounced>>
-		<br>
-		<span id="manageCorporation">
-			<<link "Manage Corporation">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Corporation">>
-			<</link>> @@.cyan;[Shift+C]@@
-		</span>
-		<<else>>
-			<br>
+
+		<<if $propHub > 0 || $secHQ > 0 || $secBarracks > 0 || $riotCenter > 0>> <br>
+			<<link "Manage Security">> <<replace "#Managesecurity">>
+
+					<<if $propHub == 1>> 
+					<span id="propHub">
+							<<link "Manage PR">>
+								<<set $nextButton = "Back", $nextLink = _Pass>>
+								<<goto "propagandaHub">>
+							<</link>>
+						</span> @@.cyan;[Shift+H]@@
+					<</if>>
+					
+					<<if $secHQ == 1>> <br>
+					<span id="securityHQ">
+							<<link "Manage Security">>
+								<<set $nextButton = "Back", $nextLink = _Pass>>
+								<<goto "securityHQ">>
+							<</link>>
+						</span> @@.cyan;[Shift+S]@@
+					<</if>>
+					
+					<<if $secBarracks == 1>> <br>
+					<span id="secBarracks">
+							<<link "Manage Military">>
+								<<set $nextButton = "Back", $nextLink = _Pass>>
+								<<goto "secBarracks">>
+							<</link>>
+						</span> @@.cyan;[Shift+A]@@
+					<</if>>
+					
+					<<if $riotCenter == 1>> <br>
+					<span id="riotCenter">
+							<<link "Manage Rebels">>
+								<<set $nextButton = "Back", $nextLink = _Pass>>
+								<<goto "riotControlCenter">>
+							<</link>>
+						</span> @@.cyan;[Shift+R]@@
+					<</if>>
+
+					<br><br>[[Back to Manage Arcology|Manage Arcology][]]
+
+			<</replace>> <</link>>
 		<</if>>
-		<br>
-		<span id="managePerson">
-			<<link "Manage Personal Affairs">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Personal Affairs">>
+
+		<<if $FSAnnounced>> <br><br>
+			<span id="FSButton">
+			<<link [[Future Societies|Future Society]]>>
+				<<set $nextButton = "Back", $nextLink = "Manage Arcology">>
 			<</link>>
-		</span> @@.cyan;[X]@@
+		</span> @@.cyan;[F]@@
+		<</if>>
 		<br>
-		<span id="PAOButton">
-			<<link [[Manage Personal Assistant|Personal assistant options]]>>
+		<span id="URButton">
+			<<link [[Universal Rules]]>><</link>>
+		</span> @@.cyan;[V]@@
+		<br>
+
+		<span id="policyButton">
+			<<link [[Policies]]>>
+				<<set $nextButton = "Back", $nextLink = "Manage Arcology">>
 			<</link>>
-		</span> @@.cyan;[T]@@
-		<br><br>
-		<<if $SF.Toggle && $SF.Active >= 1>>
-			<span id="SFMButton">
-				<<link "$SF.Caps's Firebase""Firebase">><</link>>
-			</span> @@.cyan;[Z]@@
-		<<else>>
+		</span> @@.cyan;[Y]@@
+		<<if $secExp == 1>>
 			<br>
+			<span id="edictButton">
+				<<link [[Edicts|edicts]]>>
+					<<set $nextButton = "Back", $nextLink = "Manage Arcology">>
+				<</link>>
+			</span> @@.cyan;[D]@@
 		<</if>>
-		<br><br><br><br><br>
-		<span id="optionsButton">
-		<<link "Game Options">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Options">>
-		<</link>>
-		</span> @@.cyan;[O]@@
-	<</if>>
-	<br>
+		</span>
 
-<<elseif _Pass == "Manage Arcology">>
-	<br><br>
-	<span id="managePenthouse">
-		<<link "Manage Penthouse">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Penthouse">><</link>>
-	</span> @@.cyan;[P]@@
-	<<if $propHub || $secHQ || $secBarracks || $riotCenter>>
-		<<if $secExp == 1>>
-			<<if $propHub == 1>>
-			<br>
-			<span id="propHub">
-					<<link "Manage PR">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "propagandaHub">><</link>>
+	<<elseif _Pass == "Manage Penthouse">>
+		<<link [[Wardrobe]]>><</link>>
+		<<if $dispensary>> <br>[[Pharmaceutical Fabricator|Dispensary]] <</if>>
+		<<if $ImplantProductionUpgrade>> <br> [[Implant Manufactory|Implant Manufactory]] <</if>>
+		<<if $prostheticsUpgrade > 0>> <br>[[Prosthetic Lab|Prosthetic Lab]] <</if>>
+		<<if $organFarmUpgrade>> <br>[[Organ Farm|Organ Farm]] <</if>>
+		<<if $geneticMappingUpgrade>> <br>[[Gene Lab|Gene Lab]] <</if>>
+		<<if $rep >= 10000>> <br>[[Black Market|The Black Market]] <</if>>
+
+	<<elseif _Pass == "Manage Personal Affairs">>
+		<<link [[Wardrobe]]>><</link>>
+		<<if $dispensary>> <br>[[Pharmaceutical Fabricator|Dispensary]] <</if>>
+		<<if $ImplantProductionUpgrade>> <br> [[Implant Manufactory|Implant Manufactory]] <</if>>
+		<<if $organFarmUpgrade>> <br>[[Organ Farm|Organ Farm]] <</if>>
+		<<if $geneticMappingUpgrade>> <br>[[Gene Lab|Gene Lab]] <</if>>
+		<<if $rep >= 10000>> <br> [[Black Market|The Black Market]] <</if>>
+
+	<<elseif _Pass == "Wardrobe Use">>
+		<<link [[Wardrobe (shopping)|Wardrobe]]>><</link>>
+
+	<<elseif _Pass == "Rules Assistant">>
+		<<link [[Rules Assistant Summary]]>><</link>>
+
+	<<elseif _Pass == "Options">>
+		[[Summary Options]]
+		<br>[[Description Options]]
+
+	<<elseif _Pass == "propagandaHub" || _Pass == "securityHQ" || _Pass == "secBarracks" || _Pass == "riotControlCenter">>
+		<<if $propHub == 1>>
+			<<if _Pass != "propagandaHub">>
+				<br>
+				<span id="propHub">
+					<<link "Manage PR">>
+						<<set $nextButton = "Back", $nextLink = _Pass>>
+						<<goto "propagandaHub">>
+					<</link>>
 				</span> @@.cyan;[Shift+H]@@
 			<</if>>
-			<<if $secHQ == 1>>
-			<br>
-			<span id="securityHQ">
-					<<link "Manage Security">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "securityHQ">><</link>>
+		<</if>>
+		<<if $secHQ == 1>>
+			<<if _Pass != "securityHQ">>
+				<br>
+				<span id="securityHQ">
+					<<link "Manage Security">>
+						<<set $nextButton = "Back", $nextLink = _Pass>>
+						<<goto "securityHQ">>
+					<</link>>
 				</span> @@.cyan;[Shift+S]@@
 			<</if>>
-			<<if $secBarracks == 1>>
-			<br>
-			<span id="secBarracks">
-					<<link "Manage Military">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "secBarracks">><</link>>
+		<</if>>
+		<<if $secBarracks == 1>>
+			<<if _Pass != "secBarracks">>
+				<br>
+				<span id="secBarracks">
+					<<link "Manage Military">>
+						<<set $nextButton = "Back", $nextLink = _Pass>>
+						<<goto "secBarracks">>
+					<</link>>
 				</span> @@.cyan;[Shift+A]@@
 			<</if>>
-			<<if $riotCenter == 1>>
-			<br>
-			<span id="riotCenter">
-					<<link "Manage Rebels">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "riotControlCenter">><</link>>
+		<</if>>
+		<<if $riotCenter == 1>>
+			<<if _Pass != "riotControlCenter">>
+				<br>
+				<span id="riotCenter">
+					<<link "Manage Rebels">>
+						<<set $nextButton = "Back", $nextLink = _Pass>>
+						<<goto "riotControlCenter">>
+					<</link>>
 				</span> @@.cyan;[Shift+R]@@
 			<</if>>
 		<</if>>
-	<<else>>
-		<br><br><br><br><br>
 	<</if>>
 
-	<br><br>
-	<<if $FSAnnounced>>
-		<span id="FSButton">
-		<<link [[Future Societies|Future Society]]>><<set $nextButton = "Back", $nextLink = "Manage Arcology">><</link>>
-	</span> @@.cyan;[F]@@
-	<<else>>
-		<br>
-	<</if>>
-	<br>
-	<span id="URButton">
-		<<link [[Universal Rules]]>><</link>>
-	</span> @@.cyan;[V]@@
-	<br>
-	<span id="policyButton">
-		<<link [[Policies]]>><<set $nextButton = "Back", $nextLink = "Manage Arcology">><</link>>
-	</span> @@.cyan;[Y]@@
-	<<if $secExp == 1>>
-		<br>
-		<span id="edictButton">
-			<<link [[Edicts|edicts]]>><<set $nextButton = "Back", $nextLink = "Manage Arcology">><</link>>
-		</span> @@.cyan;[D]@@
-	<<else>>
-		<br>
-	<</if>>
-	<br><br>
-	<span id="optionsButton">
-		<<link "Game Options">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Options">><</link>>
-	</span> @@.cyan;[O]@@
-	<br>
-<<elseif _Pass == "Manage Penthouse">>
-	<br>
-	<br><<link [[Wardrobe]]>><</link>>
-	<br><<if $dispensary>>[[Pharmaceutical Fabricator|Dispensary]]<</if>>
-	<br><<if $ImplantProductionUpgrade>>[[Implant Manufactory|Implant Manufactory]]<</if>>
-	<br><<if $prostheticsUpgrade > 0>>[[Prosthetic Lab|Prosthetic Lab]]<</if>>
-	<br><<if $organFarmUpgrade>>[[Organ Farm|Organ Farm]]<</if>>
-	<br><<if $geneticMappingUpgrade>>[[Gene Lab|Gene Lab]]<</if>>
-	<br><<if $rep >= 10000>>[[Black Market|The Black Market]]<</if>>
-	<br><br><br><br><br>
-	<span id="optionsButton">
-		<<link "Game Options">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Options">><</link>>
-	</span> @@.cyan;[O]@@
 	<br>
-<<elseif _Pass == "Manage Corporation">>
-	<br><br><br><br><br><br><br><br><br><br><br><br><br>
+	<<if $nextButton !== "Back to Main" && $nextButton !== "Back">> <br> <</if>>
 	<span id="optionsButton">
-		<<link "Game Options">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Options">><</link>>
+		<<link "Game Options">>
+			<<set $nextButton = "Back", $nextLink = _Pass>>
+			<<goto "Options">>
+		<</link>>
 	</span> @@.cyan;[O]@@
-	<br>
-<<elseif _Pass == "Manage Personal Affairs">>
-	<br>
-	<br><<link [[Wardrobe]]>><</link>>
-	<br><<if $dispensary>>[[Pharmaceutical Fabricator|Dispensary]]<</if>>
-	<br><<if $ImplantProductionUpgrade>>[[Implant Manufactory|Implant Manufactory]]<</if>>
-	<br><<if $organFarmUpgrade>>[[Organ Farm|Organ Farm]]<</if>>
-	<br><<if $geneticMappingUpgrade>>[[Gene Lab|Gene Lab]]<</if>>
-	<br><<if $rep >= 10000>>[[Black Market|The Black Market]]<</if>>
-	<br><br><br><br><br><br><br>
-<<elseif _Pass == "Wardrobe Use">>
-	<br>
-	<br><<link [[Wardrobe (shopping)|Wardrobe]]>><</link>>
-	<br><br><br><br><br>
-<<elseif _Pass == "Rules Assistant">>
-	<br>
-	<br><<link [[Rules Assistant Summary]]>><</link>>
-	<br><br><br><br><br>
-<<elseif _Pass == "Options">>
-	<br>
-	<br>[[Summary Options]]
-	<br>[[Description Options]]
-	<br>
-<<elseif _Pass == "propagandaHub" || _Pass == "securityHQ" || _Pass == "secBarracks" || _Pass == "riotControlCenter">>
-	<br>
-	<<if $propHub == 1>>
-		<<if _Pass != "propagandaHub">>
-			<br>
-			<span id="propHub">
-				<<link "Manage PR">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "propagandaHub">><</link>>
-			</span> @@.cyan;[Shift+H]@@
-		<</if>>
-	<</if>>
-	<<if $secHQ == 1>>
-		<<if _Pass != "securityHQ">>
-			<br>
-			<span id="securityHQ">
-				<<link "Manage Security">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "securityHQ">><</link>>
-			</span> @@.cyan;[Shift+S]@@
-		<</if>>
-	<</if>>
-	<<if $secBarracks == 1>>
-		<<if _Pass != "secBarracks">>
-			<br>
-			<span id="secBarracks">
-				<<link "Manage Military">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "secBarracks">><</link>>
-			</span> @@.cyan;[Shift+A]@@
-		<</if>>
-	<</if>>
-	<<if $riotCenter == 1>>
-		<<if _Pass != "riotControlCenter">>
-			<br>
-			<span id="riotCenter">
-				<<link "Manage Rebels">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "riotControlCenter">><</link>>
-			</span> @@.cyan;[Shift+R]@@
-		<</if>>
-	<</if>>
-	<br><br><br><br><br>
-<<else>>
-	<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
-<</if>>
-<</nobr>>
-<</if>>\
-<<nobr>>
+
+<</if>> /* Closes $ui !== "start"*/
+
 <<if (_Pass == "Encyclopedia") || ($showEncyclopedia == 0) || ($encyclopedia == " ")>>
 <<else>>
-	//FCE:// [[$encyclopedia|Encyclopedia][$nextButton = "Back", $nextLink = _Pass]]
+	<br>//FCE:// [[$encyclopedia|Encyclopedia][$nextButton = "Back", $nextLink = _Pass]]
 <</if>>
-	<br><br>
+
 <<if ($debugMode == 1)>>
-	Debugging Tools
-	<br>
-	<<link "Display Variables">><<checkvars>><</link>>
-	<br>
-	<<link "Display Changed Variables">>
+	<br><br>Debugging Tools
+	<br> <<link "Display Variables">> <<checkvars>> <</link>>
+	<br> <<link "Display Changed Variables">>
 		<<set Config.history.maxStates = 2>> /* makes sure we store the current state so we can return to it */
 		<<goto "Variable Difference">>
 	<</link>>
-	<br>
-	<<link "Bug Report">><<bugreport>><</link>>
-	<br>
+	<br> <<link "Bug Report">> <<bugreport>> <</link>> <br>
 	<<textarea "_customEvalCode" "">>
 	<<link "Run Custom Function">>
 		<<if _customEvalCode>>
@@ -827,8 +857,5 @@
 		<</if>>
 		<<goto _Pass>>
 	<</link>>
-	<br>
-	<<link "Dump Game State">><<run App.Debug.dumpGameState()>><</link>>
+	<br> <<link "Dump Game State">><<run App.Debug.dumpGameState()>><</link>>
 <</if>>
-
-<</nobr>>
-- 
GitLab