From ad854c30d24bee49607f600c2032d839de2e7d20 Mon Sep 17 00:00:00 2001
From: DCoded <dsoloha@live.com>
Date: Wed, 1 May 2019 17:14:17 -0400
Subject: [PATCH] More formatting

---
 src/SecExp/propagandaHub.tw       |  2 +-
 src/SecExp/riotControlCenter.tw   |  2 +-
 src/SecExp/secBarracks.tw         |  2 +-
 src/SecExp/securityHQ.tw          |  4 +-
 src/uncategorized/storyCaption.tw | 76 ++++++++++++++++++++++++-------
 5 files changed, 65 insertions(+), 21 deletions(-)

diff --git a/src/SecExp/propagandaHub.tw b/src/SecExp/propagandaHub.tw
index 789c67c86ac..e41b41fabe3 100644
--- a/src/SecExp/propagandaHub.tw
+++ b/src/SecExp/propagandaHub.tw
@@ -6,7 +6,7 @@
 	<<set _HistoryDiscount = 1>>
 <</if>>
 
-<<set $nextButton = "Back to Arcology Management", $nextLink = "Manage Arcology", $returnTo = "Manage Arcology">>
+<<set $nextButton = "Back", $nextLink = "Manage Arcology", $returnTo = "Manage Arcology">>
 
 Propaganda Hub
 <hr>
diff --git a/src/SecExp/riotControlCenter.tw b/src/SecExp/riotControlCenter.tw
index 7da10870a70..9899cd6a2a5 100644
--- a/src/SecExp/riotControlCenter.tw
+++ b/src/SecExp/riotControlCenter.tw
@@ -1,6 +1,6 @@
 :: riotControlCenter [nobr]
 
-<<set $nextButton = "Back to Arcology Management", $nextLink = "Manage Arcology", $returnTo = "Manage Arcology">>
+<<set $nextButton = "Back", $nextLink = "Manage Arcology", $returnTo = "Manage Arcology">>
 
 Riot Control Center
 <hr>
diff --git a/src/SecExp/secBarracks.tw b/src/SecExp/secBarracks.tw
index d00288aaa7e..a9df19c45e1 100644
--- a/src/SecExp/secBarracks.tw
+++ b/src/SecExp/secBarracks.tw
@@ -1,6 +1,6 @@
 :: secBarracks [nobr]
 
-<<set $nextButton = "Back to Arcology Management", $nextLink = "Manage Arcology", $returnTo = "Manage Arcology">>
+<<set $nextButton = "Back", $nextLink = "Manage Arcology", $returnTo = "Manage Arcology">>
 
 The Barracks
 <hr>
diff --git a/src/SecExp/securityHQ.tw b/src/SecExp/securityHQ.tw
index e61c94e9700..a274dcd2f87 100644
--- a/src/SecExp/securityHQ.tw
+++ b/src/SecExp/securityHQ.tw
@@ -6,9 +6,9 @@
 	<<set _HistoryDiscount = 1>>
 <</if>>
 
-<<set $nextButton = "Back to Arcology Management", $nextLink = "Manage Arcology", $returnTo = "Manage Arcology">>
+<<set $nextButton = "Back", $nextLink = "Manage Arcology", $returnTo = "Manage Arcology">>
 
-Security headquarters
+Security Headquarters
 <hr>
 
 The security headquarters stand in front of you. Innumerable screens flood with light the great central room. <<if $secMenials > 0>>Some slaves see you enter and interrupt their work to greet you.<</if>> From here you can build a safe and prosperous arcology.
diff --git a/src/uncategorized/storyCaption.tw b/src/uncategorized/storyCaption.tw
index 1e782c60a06..afce88a784e 100644
--- a/src/uncategorized/storyCaption.tw
+++ b/src/uncategorized/storyCaption.tw
@@ -657,29 +657,57 @@
 	</span> @@.cyan;[P]@@
 	<<if $propHub || $secHQ || $secBarracks || $riotCenter>>
 		<<if $secExp == 1>>
-			<<if $propHub == 1>>
-			<br>
-			<span id="propHub">
+			<<if $propHub && $secHQ && $secBarracks && $riotCenter>>
+				<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">
+				<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">
+				<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">
+				<br>
+				<span id="riotCenter">
 					<<link "Manage Rebels">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "riotControlCenter">><</link>>
 				</span> @@.cyan;[Shift+R]@@
+			<<else>> /* if all four aren't built */
+				<<set _breaks = []>>
+				<<if $propHub>>
+					<br>
+					<span id="propHub">
+						<<link "Manage PR">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "propagandaHub">><</link>>
+					</span> @@.cyan;[Shift+H]@@
+				<<else>>
+					<<set _breaks.push("<br>")>>
+				<</if>>
+				<<if $secHQ>>
+					<br>
+					<span id="securityHQ">
+						<<link "Manage Security">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "securityHQ">><</link>>
+					</span> @@.cyan;[Shift+S]@@
+				<<else>>
+					<<set _breaks.push("<br>")>>
+				<</if>>
+				<<if $secBarracks>>
+					<br>
+					<span id="secBarracks">
+						<<link "Manage Military">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "secBarracks">><</link>>
+					</span> @@.cyan;[Shift+A]@@
+				<<else>>
+					<<set _breaks.push("<br>")>>
+				<</if>>
+				<<if $riotCenter>>
+					<br>
+					<span id="riotCenter">
+						<<link "Manage Rebels">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "riotControlCenter">><</link>>
+					</span> @@.cyan;[Shift+R]@@
+				<<else>>
+					<<set _breaks.push("<br>")>>
+				<</if>>
 			<</if>>
 		<</if>>
 	<<else>>
@@ -710,6 +738,11 @@
 	<<else>>
 		<br>
 	<</if>>
+	<<if $propHub && $secHQ && $secBarracks && $riotCenter>>
+	<<else>>
+		<<set _breaks = _breaks.join("")>>
+		<<print _breaks>>
+	<</if>>
 	<br><br>
 	<span id="optionsButton">
 		<<link "Game Options">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Options">><</link>>
@@ -759,12 +792,15 @@
 	<br>
 <<elseif _Pass == "propagandaHub" || _Pass == "securityHQ" || _Pass == "secBarracks" || _Pass == "riotControlCenter">>
 	<br>
+	<<set _breaks = []>>
 	<<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]@@
+		<<else>>
+			<<set _breaks.push("<br>")>>
 		<</if>>
 	<</if>>
 	<<if $secHQ == 1>>
@@ -773,6 +809,8 @@
 			<span id="securityHQ">
 				<<link "Manage Security">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "securityHQ">><</link>>
 			</span> @@.cyan;[Shift+S]@@
+		<<else>>
+			<<set _breaks.push("<br>")>>
 		<</if>>
 	<</if>>
 	<<if $secBarracks == 1>>
@@ -781,6 +819,8 @@
 			<span id="secBarracks">
 				<<link "Manage Military">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "secBarracks">><</link>>
 			</span> @@.cyan;[Shift+A]@@
+		<<else>>
+			<<set _breaks.push("<br>")>>
 		<</if>>
 	<</if>>
 	<<if $riotCenter == 1>>
@@ -789,9 +829,13 @@
 			<span id="riotCenter">
 				<<link "Manage Rebels">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "riotControlCenter">><</link>>
 			</span> @@.cyan;[Shift+R]@@
+		<<else>>
+			<<set _breaks.push("<br>")>>
 		<</if>>
 	<</if>>
-	<br><br><br><br><br>
+	<<set _breaks = _breaks.join("")>>
+	<<print _breaks>>
+	<br><br><br><br><br><br><br><br><br>
 <<else>>
 	<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
 <</if>>
-- 
GitLab