From 6ea0c396cbd6467dbcb39f5ab5317b408caaf1b9 Mon Sep 17 00:00:00 2001
From: Blank_Alt <12406-Blank_Alt@users.noreply.gitgud.io>
Date: Wed, 12 Aug 2020 12:16:32 -0700
Subject: [PATCH] Sec exp minor cleanup

---
 js/003-data/gameVariableData.js               |  7 ------
 src/002-config/fc-version.js                  |  2 +-
 src/Mods/SecExp/attackOptions.tw              |  2 +-
 src/Mods/SecExp/buildings/secBarracks.tw      |  2 +-
 src/Mods/SecExp/edicts.tw                     | 10 ++++----
 src/Mods/SecExp/potentialToDo.txt             |  1 +
 src/arcologyBuilding/manufacturing.js         |  2 +-
 src/arcologyBuilding/markets.js               |  2 +-
 .../backwardsCompatibility.js                 |  2 +-
 src/gui/options/options.tw                    |  2 +-
 src/gui/storyCaption.tw                       |  2 +-
 src/uncategorized/arcmgmt.tw                  | 23 +++++++++----------
 src/uncategorized/economics.tw                |  4 ++--
 src/uncategorized/fsDevelopments.tw           |  4 ++--
 src/uncategorized/manageArcology.tw           |  4 ++--
 src/uncategorized/neighborsDevelopment.tw     |  8 +++----
 src/uncategorized/nonRandomEvent.tw           |  8 +++----
 src/uncategorized/persBusiness.tw             |  4 ++--
 src/uncategorized/reputation.tw               |  4 ++--
 src/uncategorized/scheduledEvent.tw           |  8 +++----
 20 files changed, 47 insertions(+), 54 deletions(-)

diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js
index 2c8d35a6332..c70109b0b59 100644
--- a/js/003-data/gameVariableData.js
+++ b/js/003-data/gameVariableData.js
@@ -491,13 +491,6 @@ App.Data.resetOnNGPlus = {
 	SavedLeader: 0,
 	SavedSFI: 0,
 	sectionInFirebase: 0,
-
-	militiaFounded: 0,
-	recruitVolunteers: 0,
-	conscription: 0,
-	militaryService: 0,
-	militarizedSociety: 0,
-
 	/* base vars */
 	SecExp: {},
 	PCvictories: 0,
diff --git a/src/002-config/fc-version.js b/src/002-config/fc-version.js
index ef7d1d27de8..e6ecb2184e9 100644
--- a/src/002-config/fc-version.js
+++ b/src/002-config/fc-version.js
@@ -2,5 +2,5 @@ App.Version = {
 	base: "0.10.7.1", // The vanilla version the mod is based off of, this should never be changed.
 	pmod: "3.6.2",
 	commitHash: null,
-	release: 1085
+	release: 1086
 };
diff --git a/src/Mods/SecExp/attackOptions.tw b/src/Mods/SecExp/attackOptions.tw
index fb5a5c45209..33c4b31bc86 100644
--- a/src/Mods/SecExp/attackOptions.tw
+++ b/src/Mods/SecExp/attackOptions.tw
@@ -141,7 +141,7 @@ approximately <strong><<print _estimatedMen>> men</strong> are coming, they seem
 <hr>__Battle Plan__:<br>
 <<set _leaderFound = 1>>
 <<if $leadingTroops === "bodyguard" && $BodyguardID === 0 || $leadingTroops === "headGirl" && $HeadGirlID === 0>>
-	@@.warning;Chosen leader $leadingTroops cannot be found be found, please select another.@@
+	@@.warning;Chosen leader $leadingTroops cannot be found, please select another.@@
 	<<set _leaderFound = 0>>
 <</if>>
 <<switch $leadingTroops>>
diff --git a/src/Mods/SecExp/buildings/secBarracks.tw b/src/Mods/SecExp/buildings/secBarracks.tw
index 88ef6a443e0..b1a4bf3e904 100644
--- a/src/Mods/SecExp/buildings/secBarracks.tw
+++ b/src/Mods/SecExp/buildings/secBarracks.tw
@@ -143,7 +143,7 @@ Your current maximum number of units is <<print App.SecExp.battle.maxUnits()>> (
 		<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Bots')" id="tab Bots">Security Drones</button>
 	<</if>>
 	<<if $SecExp.edicts.defense.militia >= 1>>
-		<button class="tablinks" onclick="App.UI.tabBar.openTab(event, 'Militia')" id="tab Militia">Militia: ($militiaUnits.length)</button>
+		<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Militia')" id="tab Militia">Militia: ($militiaUnits.length)</button>
 	<</if>>
 	<<if $mercenaries >= 1>>
 		<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Mercs')" id="tab Mercs">Mercenaries: ($mercUnits.length)</button>
diff --git a/src/Mods/SecExp/edicts.tw b/src/Mods/SecExp/edicts.tw
index 072a8a20467..6be9f0a36f0 100644
--- a/src/Mods/SecExp/edicts.tw
+++ b/src/Mods/SecExp/edicts.tw
@@ -3,14 +3,14 @@
 <<set $nextButton = "Back", $nextLink = "Main">>
 
 //Passing any edict will cost <<print cashFormat(5000)>> and some authority. More edicts will become available as the arcology develops.//
-<<run App.UI.tabBar.handlePreSelectedTab($tabChoice.edicts)>>
+<<run App.UI.tabbar.handlePreSelectedTab($tabChoice.edicts)>>
 <br>
-<button class="tabLinks" onclick="App.UI.tabBar.openTab(event, 'Society')" id="tab Society">Society</button>
+<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Society')" id="tab Society">Society</button>
 <<if $battlesCount > 0 || $rebellionsCount > 0 || $mercenaries > 0>>
-	<button class="tabLinks" onclick="App.UI.tabBar.openTab(event, 'Military')" id="tab Military">Military</button>
+	<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Military')" id="tab Military">Military</button>
 <</if>>
 
-<div id="Society" class="tabContent">
+<div id="Society" class="tabcontent">
 	<div class="content">
 	<<if $SecExp.edicts.alternativeRents == 1>>
 		<br>''Alternative rent payment:'' you are allowing citizens to pay for their rents in menial slaves rather than cash.
@@ -316,7 +316,7 @@
 	</div>
 </div>
 
-<div id="Military" class="tabContent">
+<div id="Military" class="tabcontent">
 	<div class="content">
 	<<if $SecExp.edicts.defense.soldierWages === 0>>
 		<br>''Low wages for soldiers:'' wages for soldiers are set to a low level compared to market standards.
diff --git a/src/Mods/SecExp/potentialToDo.txt b/src/Mods/SecExp/potentialToDo.txt
index f296e034064..3025ed4fbc3 100644
--- a/src/Mods/SecExp/potentialToDo.txt
+++ b/src/Mods/SecExp/potentialToDo.txt
@@ -1,5 +1,6 @@
 Hexall90's last merged commit: 52dde0b3
 
+- Fix broken immigration stuff (https://gitgud.io/pregmodfan/fc-pregmod/-/issues/2073 && https://gitgud.io/pregmodfan/fc-pregmod/-/merge_requests/7375)
 - My personal asst keeps getting the credit, even though I choose to personally lead my forces. (Has been this way for a fewish days): Military01.swf
 - Enable oceanic battles
 	Fine, I'll Do It Myself
diff --git a/src/arcologyBuilding/manufacturing.js b/src/arcologyBuilding/manufacturing.js
index e692f0340ab..8896de6ec0b 100644
--- a/src/arcologyBuilding/manufacturing.js
+++ b/src/arcologyBuilding/manufacturing.js
@@ -219,7 +219,7 @@ App.Arcology.Cell.Manufacturing = class extends App.Arcology.Cell.BaseCell {
 				}
 			}
 
-			if (V.secExpEnabled === 1) {
+			if (V.secExpEnabled > 0) {
 				if (V.weapManu !== 1) {
 					fragment.append(thisCell._makeUpgrade(
 						"Convert this sector to weapons manufacturing",
diff --git a/src/arcologyBuilding/markets.js b/src/arcologyBuilding/markets.js
index e93f11c3b8c..05160b6a812 100644
--- a/src/arcologyBuilding/markets.js
+++ b/src/arcologyBuilding/markets.js
@@ -99,7 +99,7 @@ App.Arcology.Cell.Market = class extends App.Arcology.Cell.BaseCell {
 			));
 		}
 
-		if (V.secExpEnabled === 1 && V.transportHub === 0) {
+		if (V.secExpEnabled > 0 && V.transportHub === 0) {
 			fragment.append(this._makeUpgrade(
 				"Centralize and modernize the transport hub",
 				() => {
diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js
index d4c5b9282ba..84aa7739791 100644
--- a/src/data/backwardsCompatibility/backwardsCompatibility.js
+++ b/src/data/backwardsCompatibility/backwardsCompatibility.js
@@ -92,7 +92,7 @@ App.Update.backwardsCompatibility = function() {
 		div.append(`Updating Security Expansion... `);
 		jQuery('#backwardsCompatibility').append(div);
 		App.SecExp.Check.general();
-		if (V.secExpEnabled === 1) {
+		if (V.secExpEnabled > 0) {
 			div.append(App.UI.DOM.renderPassage("SecExpBackwardCompatibility"));
 		}
 
diff --git a/src/gui/options/options.tw b/src/gui/options/options.tw
index 928a523ac5d..6bb51042dee 100644
--- a/src/gui/options/options.tw
+++ b/src/gui/options/options.tw
@@ -35,7 +35,7 @@
 </div>
 <div class="indent">
 	[[Apply Backwards Compatibility Update|Backwards Compatibility]]
-	<<if $secExpEnabled == 1>>
+	<<if $secExpEnabled > 0>>
 		<br>[[Apply Security Expansion mod backwards compatibility |SecExpBackwardCompatibility]]
 	<</if>>
 </div>
diff --git a/src/gui/storyCaption.tw b/src/gui/storyCaption.tw
index d4562a07d4b..cbe3ed11056 100644
--- a/src/gui/storyCaption.tw
+++ b/src/gui/storyCaption.tw
@@ -182,7 +182,7 @@
 			</div>
 		<</if>>
 
-		<<if $secExpEnabled == 1 && ($sideBarOptions.Authority + $sideBarOptions.Security + $sideBarOptions.Crime > 0)>>
+		<<if $secExpEnabled > 0 && ($sideBarOptions.Authority + $sideBarOptions.Security + $sideBarOptions.Crime > 0)>>
 			<<if $sideBarOptions.Authority > 0>>
 				<div>
 				@@.darkviolet;Auth@@ | @@.darkviolet;
diff --git a/src/uncategorized/arcmgmt.tw b/src/uncategorized/arcmgmt.tw
index a59c70dea34..615763416de 100644
--- a/src/uncategorized/arcmgmt.tw
+++ b/src/uncategorized/arcmgmt.tw
@@ -731,7 +731,7 @@ $menialBioreactors -= _expirationBR>>
 
 /*Bad weather switch*/
 <<if $weatherToday.severity > 3>>
-	<<if $secExpEnabled == 1>>
+	<<if $secExpEnabled > 0>>
 		<<if $docks < 4 && $railway < 4>>
 			<<set _weatherFreeze = 1>>
 			<<set $weatherAwareness = 1>>
@@ -746,7 +746,7 @@ $menialBioreactors -= _expirationBR>>
 		<<set _weatherFreeze = 0>>
 	<</if>>
 <<elseif $weatherToday.severity > 2>>
-	<<if $secExpEnabled == 1>>
+	<<if $secExpEnabled > 0>>
 		<<if $docks < 3 && $railway < 3>>
 			<<set _weatherFreeze = 1>>
 			<br>//The terrible weather is @@.red;preventing people from entering or leaving@@ your arcology. Improving your transport infrastructure will prevent this from happening.//
@@ -788,7 +788,7 @@ $menialBioreactors -= _expirationBR>>
 /*Bunch of visitor stuff*/
 <<if _weatherFreeze == 0>>
 <<set _FSScore = _FSScore / $FSCreditCount>>
-<<if $secExpEnabled == 1>>
+<<if $secExpEnabled > 0>>
 	<<if $docks > 0>>
 		<<set _transportHub = 0.7 + $docks / 10 + $airport / 10>>
 	<<elseif $railway > 0>>
@@ -799,7 +799,7 @@ $menialBioreactors -= _expirationBR>>
 <<else>>
 	<<set _transportHub = 1>>
 <</if>>
-<<if $secExpEnabled == 1>>
+<<if $secExpEnabled > 0>>
 	<<set _crime = (100 - $SecExp.core.crimeLow) / 100 + 0.2>>
 <<else>>
 	<<set _crime = 0.8>>
@@ -1144,10 +1144,9 @@ _SCD = Math.trunc(($upperClass * (2 + _slaveDemandU)) + ($topClass * (12 + _slav
 
 <</if>> /*ends _weatherFreeze*/
 
-<<if $secExpEnabled == 1>>
-	<<set $ASlaves = $NPCSlaves + $menials + $fuckdolls + $menialBioreactors + $secMenials + App.SecExp.Manpower.employedSlave>>
-<<else>>
-	<<set $ASlaves = $NPCSlaves + $menials + $fuckdolls + $menialBioreactors>>
+<<set $ASlaves = $NPCSlaves + $menials + $fuckdolls + $menialBioreactors>>
+<<if $secExpEnabled > 0>>
+	 <<set $ASlaves += $secMenials + App.SecExp.Manpower.employedSlave>>
 <</if>>
 <<set $ACitizens = $lowerClass + $middleClass + $upperClass + $topClass,
 _percACitizens = Math.trunc(($ACitizens / ($ACitizens + $ASlaves)) * 1000) / 10,
@@ -1243,7 +1242,7 @@ _percTopClass = Math.trunc(($topClass / ($ACitizens + $ASlaves)) * 1000) / 10>>
 	<<set _rentMultiplier *= 0.95>>
 	Food vendors are offered subsidized rent and operating expenses to set up shop in your arcology.
 <</if>>
-<<if $secExpEnabled == 1>>
+<<if $secExpEnabled > 0>>
 	<<if $SecExp.edicts.alternativeRents == 1>> /*A silly policy*/
 		Your citizens are allowed to pay their rents in slaves rather than cash and a few financially challenged individuals make use of this.
 		<<set _rentMultiplier *= 0.95>>
@@ -1381,7 +1380,7 @@ You own
 		Your unimpressive reputation relative to $arcologies[0].name's prosperity @@.yellow;slows business growth.@@
 		<<set _AWeekGrowth-->>
 	<</if>>
-	<<if $secExpEnabled == 1>>
+	<<if $secExpEnabled > 0>>
 		<<if $SecExp.core.trade <= 20>>
 			<<set _AWeekGrowth += 1>>
 		<<elseif $SecExp.core.trade <= 40>>
@@ -1531,7 +1530,7 @@ You own
 		Growth was subsidized as planned.
 		<<set _AWeekGrowth++>>
 	<</if>>
-	<<if $secExpEnabled == 1>>
+	<<if $secExpEnabled > 0>>
 		<<if $SecExp.core.authority > 18000>>
 			Your authority is so high it discourages new business, slowing down the economic growth of the arcology.
 			<<set _AWeekGrowth-->>
@@ -1584,7 +1583,7 @@ You own
 	<</if>>
 <</if>>
 
-<<if $secExpEnabled == 1>>
+<<if $secExpEnabled > 0>>
 	<br>
 	<br>
 	<<include "tradeReport">>
diff --git a/src/uncategorized/economics.tw b/src/uncategorized/economics.tw
index 848af19499a..43fd40fe338 100644
--- a/src/uncategorized/economics.tw
+++ b/src/uncategorized/economics.tw
@@ -31,7 +31,7 @@
 	<<include "Corporation Developments">>
 <</if>>
 
-<<if $secExpEnabled == 1>>
+<<if $secExpEnabled > 0>>
 	<br>
 	<<include "authorityReport">>
 	<<include "securityReport">>
@@ -57,7 +57,7 @@
 	<<if $corp.Incorporated == 1>>
 		<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Corporation')">Corporation Developments</button>
 	<</if>>
-	<<if $secExpEnabled == 1>>
+	<<if $secExpEnabled > 0>>
 		<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Authority')">Authority</button>
 		<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'securityReport')">Security</button>
 	<</if>>
diff --git a/src/uncategorized/fsDevelopments.tw b/src/uncategorized/fsDevelopments.tw
index b677953eac8..968480e655b 100644
--- a/src/uncategorized/fsDevelopments.tw
+++ b/src/uncategorized/fsDevelopments.tw
@@ -73,7 +73,7 @@
 	<</if>>
 <</if>>
 
-<<if $secExpEnabled == 1>>
+<<if $secExpEnabled > 0>>
 	<<if $SecExp.buildings.propHub.active > 0 && $SecExp.buildings.propHub.campaign >= 1 && $SecExp.buildings.propHub.focus == "social engineering">>
 		Your propaganda campaign helps further your societal engineering efforts.
 		<<if $SecExp.buildings.propHub.recruiterOffice == 0 || $RecruiterID == 0>>
@@ -169,7 +169,7 @@
 	<<run FutureSocieties.applyBroadProgress(0, _broadProgress)>>
 <</if>>
 
-<<if $secExpEnabled == 1>>
+<<if $secExpEnabled > 0>>
 	<<if $SecExp.edicts.slaveWatch == 1>>
 		The Slave Mistreatment Watch helps many slaves, easing your citizens into the paternalist ideals it represents.
 		<<= FutureSocieties.Change("Paternalist", 2)>>
diff --git a/src/uncategorized/manageArcology.tw b/src/uncategorized/manageArcology.tw
index 9a50bee0d2b..052c79c2df4 100644
--- a/src/uncategorized/manageArcology.tw
+++ b/src/uncategorized/manageArcology.tw
@@ -175,7 +175,7 @@
 	<</if>>
 <</if>>
 
-<<if $secExpEnabled == 1>>
+<<if $secExpEnabled > 0>>
 	<h2>Security</h2>
 
 	<p>
@@ -530,7 +530,7 @@
 	</p>
 <</if>>
 
-<<if $secExpEnabled == 1 && $SecExp.settings.battle.enabled == 1>>
+<<if $secExpEnabled > 0 && $SecExp.settings.battle.enabled == 1>>
 	<p>
 	<<if $SF.Toggle === 0||$SF.Active === 0>>
 		Your army counts <<print num(App.SecExp.Manpower.employedOverall)>> total soldiers.
diff --git a/src/uncategorized/neighborsDevelopment.tw b/src/uncategorized/neighborsDevelopment.tw
index e1c11a958be..f7ac60d4fc5 100644
--- a/src/uncategorized/neighborsDevelopment.tw
+++ b/src/uncategorized/neighborsDevelopment.tw
@@ -307,7 +307,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 	<<if random(0,100) >= _Catchchance-(10*$arcologies[0].CyberEconomic)>>
 		<<set $arcologies[0].prosperity -= $arcologies[0].CyberEconomic*3, _redHanded = 1>>
 		<<run repX(forceNeg(random(100,200)), "war")>>
-		<<if $secExpEnabled == 1>>
+		<<if $secExpEnabled > 0>>
 			<<set $SecExp.core.authority -= random(100,500)*$arcologies[0].CyberEconomic, $SecExp.core.crimeLow += random(10,25)>>
 		<</if>>
 		<<set $arcologies[0].prosperity = Math.clamp($arcologies[0].prosperity, 1, $AProsperityCap)>>
@@ -316,7 +316,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 	<<run cashX(_WarSpoils, "war")>>
 	<<if _redHanded == 1>>
 		A successful trace back to your arcology has exposed your actions, @@.red;damaging your reputation@@ and @@.red;scaring away potential investors.@@
-		<<if $secExpEnabled == 1>>
+		<<if $secExpEnabled > 0>>
 			To add insult to injury, @@.red;your authority has been weakened@@ and your actions have painted your arcology as a @@.red;haven for crime.@@
 		<</if>>
 	<</if>>
@@ -349,7 +349,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 	<<if random(0,100) >= _Catchchance-(10*$arcologies[0].CyberReputation)>>
 		<<set $arcologies[0].prosperity -= $arcologies[0].CyberReputation*3, _redHanded = 1>>
 		<<run repX(forceNeg(random(100,200)), "war")>>
-		<<if $secExpEnabled == 1>>
+		<<if $secExpEnabled > 0>>
 			<<set $SecExp.core.authority -= random(100,500)*$arcologies[0].CyberReputation, $SecExp.core.crimeLow += random(10,25)>>
 		<</if>>
 		<<set $arcologies[0].prosperity = Math.clamp($arcologies[0].prosperity, 1, 300)>>
@@ -357,7 +357,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 	You target $arcologies[$i].name's leadership for @@.yellow;character assassination@@ in an attempt to destabilize the arcology.
 	<<if _redHanded == 1>>
 		A successful trace back to your arcology has exposed your actions, @@.red;damaging your reputation@@ and @@.red;scaring away potential investors.@@
-		<<if $secExpEnabled == 1>>
+		<<if $secExpEnabled > 0>>
 			To add insult to injury, @@.red;your authority has been weakened@@ and your actions have painted your arcology as a @@.red;haven for crime.@@
 		<</if>>
 	<</if>>
diff --git a/src/uncategorized/nonRandomEvent.tw b/src/uncategorized/nonRandomEvent.tw
index 573fa262fc2..dac47e0ef1c 100644
--- a/src/uncategorized/nonRandomEvent.tw
+++ b/src/uncategorized/nonRandomEvent.tw
@@ -171,13 +171,13 @@
 	<<goto "P slave medic">>
 <<elseif ($eventResults.pit == 1) && ($BodyguardID != 0)>>
 	<<goto "PE pit fight">>
-<<elseif $rivalOwner == 0 && $smilingManProgress == 0 && _effectiveWeek >= 74 && $secExpEnabled == 1>>
+<<elseif $rivalOwner == 0 && $smilingManProgress == 0 && _effectiveWeek >= 74 && $secExpEnabled > 0>>
 	<<goto "secExpSmilingMan">>
-<<elseif $rivalOwner == 0 && $smilingManProgress == 1 && _effectiveWeek >= 77 && $secExpEnabled == 1>>
+<<elseif $rivalOwner == 0 && $smilingManProgress == 1 && _effectiveWeek >= 77 && $secExpEnabled > 0>>
 	<<goto "secExpSmilingMan">>
-<<elseif $rivalOwner == 0 && $smilingManProgress == 2 && _effectiveWeek >= 82 && $secExpEnabled == 1>>
+<<elseif $rivalOwner == 0 && $smilingManProgress == 2 && _effectiveWeek >= 82 && $secExpEnabled > 0>>
 	<<goto "secExpSmilingMan">>
-<<elseif $rivalOwner == 0 && $smilingManProgress == 3 && $secExpEnabled == 1>>
+<<elseif $rivalOwner == 0 && $smilingManProgress == 3 && $secExpEnabled > 0>>
 	<<goto "secExpSmilingMan">>
 <<elseif ($rivalOwner == 0) && ($seeFCNN == 1) && ($FCNNstation == 0) && ($week > 95) && ($cash > 200000) && ($rep > 7500)>>
 	<<goto "SE FCNN Station">>
diff --git a/src/uncategorized/persBusiness.tw b/src/uncategorized/persBusiness.tw
index 1411455f684..a62ed54904e 100644
--- a/src/uncategorized/persBusiness.tw
+++ b/src/uncategorized/persBusiness.tw
@@ -667,7 +667,7 @@
 		This week your services to the highest bidder earned you @@.yellowgreen;<<print cashFormat(_windfall)>>.@@
 		<<if random(0,100) >= _Catchtchance>>
 			However, since the source of the attack was traced back to your arcology, your
-			<<if $secExpEnabled == 1>> <<set _X = 1>>
+			<<if $secExpEnabled > 0>> <<set _X = 1>>
 				@@.red;authority,@@ <<set $SecExp.core.authority -= random(100,500)>> @@.red;crime rate@@ <<set $SecExp.core.crimeLow += random(10,25)>> and
 			<</if>>
 			@@.red;reputation@@ <<run repX(forceNeg(random(50,500)), "event")>>
@@ -726,7 +726,7 @@
 	<</if>>
 <</if>>
 
-<<if $secExpEnabled == 1>>
+<<if $secExpEnabled > 0>>
 	<<if $smilingManFate == 0 && random(1,100) >= 85>>
 		This week one of the offside adventures of The Smiling Man produced a copious amount of money, of which @@.yellowgreen;you receive your share.@@
 		<<run cashX(random(10,20) * 1000, "personalBusiness")>>
diff --git a/src/uncategorized/reputation.tw b/src/uncategorized/reputation.tw
index 63da53baf26..28c2caa694d 100644
--- a/src/uncategorized/reputation.tw
+++ b/src/uncategorized/reputation.tw
@@ -299,7 +299,7 @@ _enduringRep = $enduringRep>>
 	<</if>>
 <</if>>
 
-<<if $secExpEnabled == 1>>
+<<if $secExpEnabled > 0>>
 	<<if $smilingManFate == 1>>
 		The grim statue of the Smiling Man outside your arcology @@.green;reminds the world of who managed to eliminate such a threat.@@
 		<<run repX(100, "architecture")>>
@@ -783,7 +783,7 @@ _enduringRep = $enduringRep>>
 	<<run repX(500, "policies")>>
 <</if>>
 
-<<if $secExpEnabled == 1>>
+<<if $secExpEnabled > 0>>
 	<<if $SecExp.buildings.propHub.fakeNews > 0>>
 		The authenticity department produces and distributes copious amounts of plausible enough news and reports, @@.green;increasing your reputation.@@
 		<<run repX(10 * $SecExp.buildings.propHub.miniTruth, "policies")>>
diff --git a/src/uncategorized/scheduledEvent.tw b/src/uncategorized/scheduledEvent.tw
index 700e70fe0ed..8da5466503d 100644
--- a/src/uncategorized/scheduledEvent.tw
+++ b/src/uncategorized/scheduledEvent.tw
@@ -86,7 +86,7 @@
 	<<set $fcnn.push("...evidence of a planned slave uprising, executed all of their arcology's several thousand...")>>
 <</if>>
 
-<<if $secExpEnabled == 1>>
+<<if $secExpEnabled > 0>>
 	<<if $SecExp.settings.battle.enabled > 0>>
 		<<include "attackGenerator">>
 	<</if>>
@@ -94,11 +94,11 @@
 
 <<if $rivalOwner == -1>>
 	<<goto "P rival initiation">>
-<<elseif $slaveRebellion == 1 && $secExpEnabled == 1>>
+<<elseif $slaveRebellion == 1 && $secExpEnabled > 0>>
 	<<goto "rebellionOptions">>
-<<elseif $citizenRebellion == 1 && $secExpEnabled == 1>>
+<<elseif $citizenRebellion == 1 && $secExpEnabled > 0>>
 	<<goto "rebellionOptions">>
-<<elseif $attackThisWeek == 1 && $secExpEnabled == 1>>
+<<elseif $attackThisWeek == 1 && $secExpEnabled > 0>>
 	<<goto "attackOptions">>
 <<elseif $PC.labor == 1>>
 	<<goto "SE Player Birth">>
-- 
GitLab