From 4ed9f9f780e426c27ed2a91f2238283ebaf8df53 Mon Sep 17 00:00:00 2001
From: Svornost <11434-svornost@users.noreply.gitgud.io>
Date: Sat, 18 Dec 2021 16:30:24 -0500
Subject: [PATCH] Fix stray text when you have no mercenaries yet

---
 src/arcologyBuilding/ManageArcology.js | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/src/arcologyBuilding/ManageArcology.js b/src/arcologyBuilding/ManageArcology.js
index a147ed0fa15..1c90aa3291c 100644
--- a/src/arcologyBuilding/ManageArcology.js
+++ b/src/arcologyBuilding/ManageArcology.js
@@ -399,33 +399,35 @@ App.UI.manageArcology = function() {
 	if (V.personalArms === 0 && V.mercenaries === 0 && V.assistant.personality <= 0) {
 		App.UI.DOM.makeElement("div", `${arcName} has no special upgrades.`, "note");
 	} else {
-		r = [];
 		if (V.personalArms > 0) {
+			r = [];
 			r.push(`You own a prototype powered exoskeleton that mounts armor and a smart mortar system, and has rifles mounted into its forearms.`);
 			if (V.personalArms > 1) {
 				r.push(`Furthermore, your security drones can rearm with small-caliber guns if necessary.`);
 			}
+			App.UI.DOM.appendNewElement("div", node, r.join(" "), "indent");
 		}
-		App.UI.DOM.appendNewElement("div", node, r.join(" "), "indent");
 
-		r = [];
-		if (V.mercenaries.isBetween(1, 5)) {
-			r.push(`A ${V.mercenaries === 1 ? "squad" : "full platoon"} of mercenaries is permanently quartered in ${arcName}.`);
-		} else if (V.mercenaries >= 5) {
-			r.push(`You have permanently settled a full company of mercenaries in ${arcName} as your ${V.mercenariesTitle}.`);
+		if (V.mercenaries > 0) {
+			r = [];
+			if (V.mercenaries.isBetween(1, 5)) {
+				r.push(`A ${V.mercenaries === 1 ? "squad" : "full platoon"} of mercenaries is permanently quartered in ${arcName}.`);
+			} else if (V.mercenaries >= 5) {
+				r.push(`You have permanently settled a full company of mercenaries in ${arcName} as your ${V.mercenariesTitle}.`);
+			}
+			r.push(`They are grim men and women${V.mercenaries < 5 ? ", heavily armed and armored" : " who appreciate their luxurious life here and train hard to keep their skills with their prototype armor sharp"}.`);
+			App.UI.DOM.appendNewElement("div", node, r.join(" "), "indent");
 		}
-		r.push(`They are grim men and women${V.mercenaries < 5 ? ", heavily armed and armored" : " who appreciate their luxurious life here and train hard to keep their skills with their prototype armor sharp"}.`);
-		App.UI.DOM.appendNewElement("div", node, r.join(" "), "indent");
 
-		r = [];
 		if (V.assistant.personality > 0) {
+			r = [];
 			const {hisA, heA} = getPronouns(assistant.pronouns().main).appendSuffix("A");
 			r.push(`${capFirstChar(V.assistant.name)} is using an alternative personality setting, speaking in a sultry, sexual voice, and talking as though the penthouse's sex toys are ${hisA} body.`);
 			if (V.assistant.personality > 1) {
 				r.push(`${heA} also has charge of all smart piercings in the arcology, and is using ${hisA} adaptations to sexual duties to improve their effectiveness.`);
 			}
+			App.UI.DOM.appendNewElement("div", node, r.join(" "), "indent");
 		}
-		App.UI.DOM.appendNewElement("div", node, r.join(" "), "indent");
 	}
 
 	App.UI.DOM.appendNewElement("h2", node, "Slaves");
-- 
GitLab