From f0b4b092a1e90c1375551fd283ec162bf47f0918 Mon Sep 17 00:00:00 2001
From: Blank_Alt <12406-Blank_Alt@users.noreply.gitgud.io>
Date: Wed, 5 Aug 2020 22:11:54 -0700
Subject: [PATCH] minorSecExpTweaks

---
 js/003-data/gameVariableData.js                   | 1 -
 src/Mods/SecExp/attackOptions.tw                  | 4 ++--
 src/Mods/SecExp/buildings/weaponsManufacturing.tw | 8 ++++----
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js
index 366c1f2cdcd..b8bb22e8950 100644
--- a/js/003-data/gameVariableData.js
+++ b/js/003-data/gameVariableData.js
@@ -397,7 +397,6 @@ App.Data.resetOnNGPlus = {
 	weapManu: 0,
 	weapProductivity: 1,
 	weapLab: 1,
-	baseUpgradeTime: 10,
 	weapUpgrades: [],
 	currentUpgrade: {},
 	droneUpgrades: {},
diff --git a/src/Mods/SecExp/attackOptions.tw b/src/Mods/SecExp/attackOptions.tw
index 841e84f9774..9d6b8c92439 100644
--- a/src/Mods/SecExp/attackOptions.tw
+++ b/src/Mods/SecExp/attackOptions.tw
@@ -184,7 +184,7 @@ approximately <strong><<print _estimatedMen>> men</strong> are coming, they seem
 	<<set _leader = "$assistant.name will">>
 	<<replace "#leader">><strong><<print _leader>></strong><</replace>>
 <</link>>
-<<if $BodyguardID != 0 && $slavesOfficers == 1>>
+<<if $BodyguardID != 0 && $SecExp.edicts.defense.slavesOfficers == 1>>
 	|
 	<<link "Let your bodyguard lead your troops">>
 		<<set $leadingTroops = "bodyguard">>
@@ -192,7 +192,7 @@ approximately <strong><<print _estimatedMen>> men</strong> are coming, they seem
 		<<replace "#leader">><strong><<print _leader>></strong><</replace>>
 	<</link>>
 <</if>>
-<<if $HeadGirlID != 0 && $slavesOfficers == 1>>
+<<if $HeadGirlID != 0 && $SecExp.edicts.defense.slavesOfficers == 1>>
 	|
 	<<link "Let your Head Girl lead your troops">>
 		<<set $leadingTroops = "headGirl">>
diff --git a/src/Mods/SecExp/buildings/weaponsManufacturing.tw b/src/Mods/SecExp/buildings/weaponsManufacturing.tw
index 3b795262e9c..04adfbd9311 100644
--- a/src/Mods/SecExp/buildings/weaponsManufacturing.tw
+++ b/src/Mods/SecExp/buildings/weaponsManufacturing.tw
@@ -1,6 +1,6 @@
 :: weaponsManufacturing [nobr]
 
-<<set $nextButton = "Back", $nextLink = "Main">>
+<<set $nextButton = "Back", $nextLink = "Main", _baseUpgradeTime = 10>>
 
 This sector of the arcology has been dedicated to weapons manufacturing. These factories supply
 <<if $militiaUnits.length > 0>> your militia and<</if>>
@@ -104,8 +104,8 @@ You own <<print num($menials)>> free menial slaves. This manufacturing complex c
 		<<run cashX(forceNeg(10000 * $weapProductivity), "capEx")>>
 		<<set $weapProductivity++>>
 		<<if $currentUpgrade.time > 0>>
-			<<set _percentComplete = $currentUpgrade.time / ($baseUpgradeTime / ($weapProductivity - 1))>>
-			<<set _newTime = Math.ceil(_percentComplete * $baseUpgradeTime / $weapProductivity)>>
+			<<set _percentComplete = $currentUpgrade.time / (_baseUpgradeTime / ($weapProductivity - 1))>>
+			<<set _newTime = Math.ceil(_percentComplete * _baseUpgradeTime / $weapProductivity)>>
 			<<set $currentUpgrade.time = _newTime>>
 		<</if>>
 		<<goto "weaponsManufacturing">>
@@ -189,7 +189,7 @@ __Markets__:
 	<</link>>
 <</if>>
 <br><br>
-<<set _time = Math.ceil($baseUpgradeTime / $weapProductivity)>>
+<<set _time = Math.ceil(_baseUpgradeTime / $weapProductivity)>>
 Upgrades:
 With our current industrial and research capabilities upgrades will be finished in _time weeks.
 
-- 
GitLab