From c0077978ebf344e6c49eeffc914b2b028ba2b97d Mon Sep 17 00:00:00 2001
From: Blank <okp57855@psoxs.com>
Date: Fri, 28 Sep 2018 03:32:50 -0700
Subject: [PATCH] HotFixes

---
 slave variables documentation - Pregmod.txt |   2 -
 src/init/dummy.tw                           |   4 +-
 src/uncategorized/BackwardsCompatibility.tw | 194 ++++++++------------
 src/uncategorized/options.tw                |   9 -
 4 files changed, 82 insertions(+), 127 deletions(-)

diff --git a/slave variables documentation - Pregmod.txt b/slave variables documentation - Pregmod.txt
index cf3861e5dc8..16b69d176a0 100644
--- a/slave variables documentation - Pregmod.txt	
+++ b/slave variables documentation - Pregmod.txt	
@@ -2774,8 +2774,6 @@ pregWeek:
 How long she has been pregnant (used in place of .preg when pregnancy speed up and slow down are used on a slave) (if negative, designates postpartum.)
 accepts int
 
-< 0 - postpartum
-
 belly:
 
 how big their belly is in CCs
diff --git a/src/init/dummy.tw b/src/init/dummy.tw
index 91814d6e28b..f0f35d1bd47 100644
--- a/src/init/dummy.tw
+++ b/src/init/dummy.tw
@@ -20,8 +20,10 @@ $$i
 $activeSlave.bodySwap, $activeSlave.customImageFormat, $activeSlave.customHairVector, $activeSlave.shoeColor, $activeSlave.newGamePlus, $activeSlave.nipplesAccessory
 $drugs, $harshCollars, $shoes, $bellyAccessories, $vaginalAccessories, $dickAccessories, $buttplugs
 $PC.origRace, $PC.origSkin
-$SFIDs, $SupportFacilityDecoration, $SupportFacilityEfficiency
 $isReady, $fatherID,
 $servantsQuartersSpots
 $sEnunciate, $SEnunciate, $ssEnunciate, $cEnunciate, $ccEnunciate, $zEnunciate, $shEnunciate, $ShEnunciate, $xEnunciate
+$Girl,$pitAnimal
+$securityForceRecruit, $securityForceTrade,$securityForceBooty, $securityForceIncome, $securityForceMissionEfficiency,$securityForceProfitable, $TierTwoUnlock
+$SupportFacilityName,$SupportFacilityNameCount,$SupportFacilityDecoration,$SupportFacilityEfficiency,$FacilitySupportSpeedUpgrades,$FacilitySupportTrainingUpgrade,$SFIDs,$SupportFacilitySlaves
 */
diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw
index a6ab55a4e4d..85dcd29d28b 100644
--- a/src/uncategorized/BackwardsCompatibility.tw
+++ b/src/uncategorized/BackwardsCompatibility.tw
@@ -952,125 +952,89 @@
 <</if>>
 
 /*SFVAR*/
-<<if def $SF && $SFSaveRepair === 1>>
-	<<set $SFMODToggle = $SF.Toggle>>
-	<<if $SF.Active >= 1>>
-		<<set $securityForceActive = 1,$securityForceCreate = 1,$securityForceEventSeen = 1>>
-	<<else>>
-		<<set $securityForceActive = 0,$securityForceCreate = 0,$securityForceEventSeen = 0>>
-	<</if>>
-
-	<<set $securityForceDepravity = $SF.Depravity>>
-	<<set $SF.MWU = $securityForceUpgradeTokenReset, $SF.U = $securityForceUpgradeToken>>
-	<<set $securityForceGiftToken = $SF.WG,$securityForceRulesOfEngagement = $SF.ROE>>
-	<<set $securityForceFocus = $SF.Target,$securityForceAccountability = $SF.Regs>>
-	<<set $securityForceName = $SF.Lower,$SubsidyActive = $SF.Subsidy>>
-
-	<<set $ColonelCore = $SFColonel.Core,$securityForceColonelToken = $SFColonel.Talk>>
-	<<set $securityForceColonelSexed = $SFColonel.Fun,$ColonelRelationship = $SFColonel.Status>>
-
-	<<set $OverallTradeShowAttendance = $SFTradeShow.History,$CurrentTradeShowAttendance = $SFTradeShow.CanAttend>>
-	<<set $TradeShowIncome = $SFTradeShow.Income,$TotalTradeShowIncome = $SFTradeShow.Revenue>>
-	<<set $TradeShowHelots = $SFTradeShow.Helots,$TotalTradeShowHelots = $SFTradeShow.TotalHelots>>
-
-	<<set $securityForcePersonnel = $SFUnit.Troops,$securityForceInfantryPower = $SFUnit.Armoury>>
-	<<set $securityForceArcologyUpgrades = $SFUnit.Firebase,$securityForceVehiclePower = $SFUnit.Vehicles>>
-	<<set $securityForceDronePower = $SFUnit.Drones,$securityForceStimulantPower = $SFUnit.Drugs>>
-	<<set $securityForceHeavyBattleTank = $SFUnit.PGT,$securityForceAircraftPower = $SFUnit.AirForce>>
-	<<set $securityForceSpacePlanePower = $SFUnit.SpacePlane,$securityForceAC130 = $SFUnit.GunS>>
-	<<set $securityForceSatellitePower = $SFUnit.Satellite,$securityForceGiantRobot = $SFUnit.GiantRobot>>
-	<<set $securityForceMissileSilo = $SFUnit.MissileSilo,$securityForceAircraftCarrier = $SFUnit.AircraftCarrier>>
-	<<set $securityForceSubmarine = $SFUnit.Sub,$securityForceHeavyAmphibiousTransport = $SFUnit.HAT>>
-
-	<<set $SFAO = $SF.Units>>
-	<<if $SFAO < 30>>
-		<<if $securityForceInfantryPower > 5>> <<set $securityForceInfantryPower = 5>> <</if>>
-		<<if $securityForceArcologyUpgrades > 5>> <<set $securityForceArcologyUpgrades = 5>> <</if>>
-		<<if $securityForceVehiclePower > 5>> <<set $securityForceVehiclePower = 5>> <</if>>
-		<<if $securityForceDronePower > 5>> <<set $securityForceDronePower = 5>> <</if>>
-		<<if $securityForceStimulantPower > 5>> <<set $securityForceStimulantPower = 5>> <</if>>
-		<<if $securityForceAircraftPower > 5>> <<set $securityForceAircraftPower = 5>> <</if>>
-	<</if>>
-	<<unset $SF, $SFColonel, $SFTradeShow, $SFUnit>>
-	<<set $SFSaveRepair = 0>>
-<<elseif $SFSaveRepair === 0>>
-	<<if $securityForceEventSeen === 0>> <<set $securityForceActive = -1>> <<else>> <<set $securityForceActive = 2>> <</if>>
+<<if ndef $SF>>
+	<<if $securityForceEventSeen < 1>> <<set $securityForceActive = -1>> <<else>> <<set $securityForceActive = 2>> <</if>>
 	
 	<<set $SF = Object.assign({}, $SF, {Toggle:$SFMODToggle, Active:$securityForceActive})>>
 	<<unset $SFMODToggle, $securityForceActive, $securityForceCreate, $securityForceEventSeen>>
+		<<if ndef $securityForceName>> <<set $securityForceName = "the special force">> <</if>>
+		<<if $SF.Active >= 1>>
+			<<run Object.assign($SF, {Depravity:$securityForceDepravity,
+			Units:$SFAO, MWU:$securityForceUpgradeTokenReset, U:$securityForceUpgradeToken,
+			WG:$securityForceGiftToken, SpecOps:0, SpecOpsLock:0, ROE:$securityForceRulesOfEngagement,
+			Target:$securityForceFocus, Regs:$securityForceAccountability,
+			Caps:"The Special Force", Lower:$securityForceName, Subsidy:$SubsidyActive})>>
+				<<unset $securityForceActive, $securityForceRecruit, $securityForceTrade,
+				$securityForceBooty, $securityForceIncome, $securityForceMissionEfficiency,
+				$securityForceProfitable, $TierTwoUnlock, $securityForceDepravity, $SFAO,
+				$securityForceUpgradeTokenReset, $securityForceUpgradeToken,
+				$securityForceGiftToken, $securityForceRulesOfEngagement, $securityForceFocus,
+				$securityForceAccountability, $securityForceName, $SubsidyActive>>
+			<<if $SF.Lower != "the special force">>
+				<<set $SF.Caps = $SF.Lower.replace("the ", "The ")>>
+			<</if>>
 
-	<<if $SF.Toggle === 1 && $SF.Active >= 1>>
-		<<run Object.assign($SF, {Depravity:$securityForceDepravity,
-		Units:$SFAO, MWU:$securityForceUpgradeTokenReset, U:$securityForceUpgradeToken,
-		WG:$securityForceGiftToken, SpecOps:0, SpecOpsLock:0, ROE:$securityForceRulesOfEngagement,
-		Target:$securityForceFocus, Regs:$securityForceAccountability,
-		Caps:"The Special Force", Lower:$securityForceName, Subsidy:$SubsidyActive})>>
-			<<unset $securityForceActive, $securityForceRecruit, $securityForceTrade,
-			$securityForceBooty, $securityForceIncome, $securityForceMissionEfficiency,
-			$securityForceProfitable, $TierTwoUnlock, $securityForceDepravity, $SFAO,
-			$securityForceUpgradeTokenReset, $securityForceUpgradeToken,
-			$securityForceGiftToken, $securityForceRulesOfEngagement, $securityForceFocus,
-			$securityForceAccountability, $securityForceName, $SubsidyActive>>
-		<<if $SF.Lower != "the special force">>
-			<<set $SF.Caps = $SF.Lower.replace("the ", "The ")>>
-		<</if>>
-
-		<<if ndef $ColonelCore>> <<set $ColonelCore = "">> <</if>>
-		<<if ndef $ColonelDiscussion>> <<set $ColonelDiscussion = 0>> <</if>>
-		<<if ndef $ColonelSexed>> <<set $ColonelSexed = 0>> <</if>>
-		<<set $SFColonel = Object.assign({}, $SFColonel = {Core:$ColonelCore, Talk:$securityForceColonelToken,
-		Fun:$securityForceColonelSexed, Status:$ColonelRelationship})>>
-			<<unset $ColonelCore, $securityForceColonelToken, securityForceColonelSexed,
-			ColonelRelationship>>
-
-		<<if ndef $TradeShowIncome>> <<set $TradeShowIncome = 0>> <</if>>
-		<<if ndef $TotalTradeShowIncome>> <<set $TotalTradeShowIncome = 0>> <</if>>
-		<<if ndef $TradeShowHelots>> <<set $TradeShowHelots = 0>> <</if>>
-		<<if ndef $TotalTradeShowHelots>> <<set $TotalTradeShowHelots = 0>> <</if>>
-		<<set $SFTradeShow = Object.assign({}, $SFTradeShow, {History:$OverallTradeShowAttendance,
-		CanAttend:$CurrentTradeShowAttendance, Income:$TradeShowIncome,
-		Revenue:$TotalTradeShowIncome, Helots:$TradeShowHelots,
-		TotalHelots:$TotalTradeShowHelots, Mercs:0, TotalMercs:0})>>
-			<<unset $OverallTradeShowAttendance, $CurrentTradeShowAttendance,
-			$TradeShowIncome, $TotalTradeShowIncome, $TradeShowHelots,
-			$TotalTradeShowHelots>>
-		<<if $SFTradeShow.History > 0>> <<set $SFTradeShow.View = 1>> <</if>>
-
-		<<if ndef $securityForceHeavyBattleTank>>
-			<<set $securityForceHeavyBattleTank = 0>> <</if>>
-		<<if ndef $securityForceSpacePlanePower>>
-			<<set $securityForceSpacePlanePower = 0>> <</if>>
-		<<if ndef $securityForceAC130>> <<set $securityForceAC130 = 0>> <</if>>
-		<<if ndef $securityForceSatellitePower>>
-			<<set $securityForceSatellitePower = 0>> <</if>>
-		<<if ndef $securityForceGiantRobot>>
-					<<set $securityForceGiantRobot = 0>> <</if>>
-				<<if ndef $securityForceMissileSilo>>
-					<<set $securityForceMissileSilo = 0>> <</if>>
-		<<if ndef $securityForceAircraftCarrier>>
-				<<set $securityForceAircraftCarrier = 0>> <</if>>
-			<<if ndef $securityForceSubmarine>>
-				<<set $securityForceSubmarine = 0>> <</if>>
-			<<if ndef $securityForceHeavyAmphibiousTransport>>
-				<<set $securityForceHeavyAmphibiousTransport = 0>> <</if>>
-		<<set $SFUnit = Object.assign({}, $SFUnit, {Troops:$securityForcePersonnel,
-		Armoury:$securityForceInfantryPower, Firebase:$securityForceArcologyUpgrades,
-		AV:$securityForceVehiclePower, TV:$securityForceVehiclePower,
-		Drones:$securityForceDronePower, Drugs:$securityForceStimulantPower,
-		PGT:$securityForceHeavyBattleTank,AA:$securityForceAircraftPower,
-		TA:$securityForceAircraftPower, SpacePlane:$securityForceSpacePlanePower,
-		GunS:$securityForceAC130, Satellite:$securityForceSatellitePower,
-		GiantRobot:$securityForceGiantRobot, MissileSilo:$securityForceMissileSilo,
-		AircraftCarrier:$securityForceAircraftCarrier, Sub:$securityForceSubmarine,
-		HAT:$securityForceHeavyAmphibiousTransport})>> <<set $SatLaunched = 0>>
-			<<unset $securityForcePersonnel, $securityForceInfantryPower,
-			$securityForceArcologyUpgrades, $securityForceVehiclePower,
-			$securityForceDronePower, $securityForceStimulantPower,
-			$securityForceHeavyBattleTank, $securityForceAircraftPower,
-			$securityForceSpacePlanePower,$securityForceAC130, $securityForceSatellitePower,
-			$securityForceGiantRobot, $securityForceMissileSilo,
-			$securityForceAircraftCarrier, $securityForceSubmarine, $securityForceHeavyAmphibiousTransport>>
-		<<set $SFSaveRepair = -1>>
+			<<if ndef $ColonelCore>> <<set $ColonelCore = "">> <</if>>
+			<<if ndef $ColonelDiscussion>> <<set $ColonelDiscussion = 0>> <</if>>
+			<<if ndef $ColonelSexed>> <<set $ColonelSexed = 0>> <</if>>
+			<<set $SFColonel = Object.assign({}, $SFColonel = {Core:$ColonelCore, Talk:$securityForceColonelToken,
+			Fun:$securityForceColonelSexed, Status:$ColonelRelationship})>>
+				<<unset $ColonelCore, $securityForceColonelToken, $securityForceColonelSexed,
+				$ColonelRelationship>>
+
+			<<if ndef $TradeShowIncome>> <<set $TradeShowIncome = 0>> <</if>>
+			<<if ndef $TotalTradeShowIncome>> <<set $TotalTradeShowIncome = 0>> <</if>>
+			<<if ndef $TradeShowHelots>> <<set $TradeShowHelots = 0>> <</if>>
+			<<if ndef $TotalTradeShowHelots>> <<set $TotalTradeShowHelots = 0>> <</if>>
+			<<set $SFTradeShow = Object.assign({}, $SFTradeShow, {History:$OverallTradeShowAttendance,
+			CanAttend:$CurrentTradeShowAttendance, Income:$TradeShowIncome,
+			Revenue:$TotalTradeShowIncome, Helots:$TradeShowHelots,
+			TotalHelots:$TotalTradeShowHelots, Mercs:0, TotalMercs:0})>>
+				<<unset $OverallTradeShowAttendance, $CurrentTradeShowAttendance,
+				$TradeShowIncome, $TotalTradeShowIncome, $TradeShowHelots,
+				$TotalTradeShowHelots>>
+			<<if $SFTradeShow.History > 0>> <<set $SFTradeShow.View = 1>> <</if>>
+
+			<<if ndef $securityForceHeavyBattleTank>>
+				<<set $securityForceHeavyBattleTank = 0>> <</if>>
+			<<if ndef $securityForceSpacePlanePower>>
+				<<set $securityForceSpacePlanePower = 0>> <</if>>
+			<<if ndef $securityForceAC130>> <<set $securityForceAC130 = 0>> <</if>>
+			<<if ndef $securityForceSatellitePower>>
+				<<set $securityForceSatellitePower = 0>> <</if>>
+			<<if ndef $securityForceGiantRobot>>
+						<<set $securityForceGiantRobot = 0>> <</if>>
+					<<if ndef $securityForceMissileSilo>>
+						<<set $securityForceMissileSilo = 0>> <</if>>
+			<<if ndef $securityForceAircraftCarrier>>
+					<<set $securityForceAircraftCarrier = 0>> <</if>>
+				<<if ndef $securityForceSubmarine>>
+					<<set $securityForceSubmarine = 0>> <</if>>
+				<<if ndef $securityForceHeavyAmphibiousTransport>>
+					<<set $securityForceHeavyAmphibiousTransport = 0>> <</if>>
+			<<set $SFUnit = Object.assign({}, $SFUnit, {Troops:$securityForcePersonnel,
+			Armoury:$securityForceInfantryPower, Firebase:$securityForceArcologyUpgrades,
+			AV:$securityForceVehiclePower, TV:$securityForceVehiclePower,
+			Drones:$securityForceDronePower, Drugs:$securityForceStimulantPower,
+			PGT:$securityForceHeavyBattleTank,AA:$securityForceAircraftPower,
+			TA:$securityForceAircraftPower, SpacePlane:$securityForceSpacePlanePower,
+			GunS:$securityForceAC130, Satellite:$securityForceSatellitePower,
+			GiantRobot:$securityForceGiantRobot, MissileSilo:$securityForceMissileSilo,
+			AircraftCarrier:$securityForceAircraftCarrier, Sub:$securityForceSubmarine,
+			HAT:$securityForceHeavyAmphibiousTransport})>> <<set $SatLaunched = 0>>
+				<<unset $securityForcePersonnel, $securityForceInfantryPower,
+				$securityForceArcologyUpgrades, $securityForceVehiclePower,
+				$securityForceDronePower, $securityForceStimulantPower,
+				$securityForceHeavyBattleTank, $securityForceAircraftPower,
+				$securityForceSpacePlanePower,$securityForceAC130, $securityForceSatellitePower,
+				$securityForceGiantRobot, $securityForceMissileSilo,
+				$securityForceAircraftCarrier, $securityForceSubmarine, $securityForceHeavyAmphibiousTransport>>
+		<<else>>
+			<<run Object.assign($SF, {Depravity:0, Units:0, MWU:0, U:0, WG:0, SpecOps:0, SpecOpsLock:0, ROE:"hold", Target:"recruit", Regs:"strict", Caps:"The Special Force", Lower:"the special force", Subsidy:1})>>
+			<<set $SFUnit = Object.assign({}, $SFUnit, {Troops:40, Armoury:0, Firebase:0, AV:0, TV:0, Drones:0, Drugs:0, PGT:0, AA:0, TA:0, SpacePlane:0, GunS:0, Satellite:0, GiantRobot:0, MissileSilo:0, AircraftCarrier:0, Sub:0, HAT:0})>>
+			<<set $SatLaunched = 0>>
+			<<set $arcologies[0].SFRaid = 1,$arcologies[0].SFRaidTarget = -1>> <<set $SFColonel = Object.assign({}, $SFColonel, {Core:"", Talk:0, Fun:0, Status:0})>>
+			<<set $SFTradeShow = Object.assign({}, $SFTradeShow, {History:0, CanAttend:0, Income:0, Revenue:0, Helots:0, TotalHelots:0, Mercs:0, TotalMercs:0})>>
 	<</if>>
 <</if>>
 <<if def $SF>>
diff --git a/src/uncategorized/options.tw b/src/uncategorized/options.tw
index 04048c2ab2a..26076861acf 100644
--- a/src/uncategorized/options.tw
+++ b/src/uncategorized/options.tw
@@ -429,15 +429,6 @@ Curative side effects are @@.red;DISABLED@@. [[Enable|Options][$curativeSideEffe
 <<else>>
 	@@.cyan;ENABLED@@. [[Disable|Options][$SF.Toggle = 0]]
 <</if>> //Will not affect mod content that has already been encountered.//
-<<if ndef $SFSaveRepair>> <<set $SFSaveRepair = 1>> <</if>>
-<br>&nbsp;Save repair is
-<<if $SFSaveRepair === 1>>
-	@@.cyan;ON@@. [[OFF|Options][$SFSaveRepair = 0]]|[[DISABLE|Options][$SFSaveRepair = -1]]
-<<elseif $SFSaveRepair === 0>>
-	@@.red;OFF@@. [[ON|Options][$SFSaveRepair = 1]]|[[DISABLE|Options][$SFSaveRepair = -1]]
-<<elseif $SFSaveRepair === -1>>
-	@@.red;DISABLED@@. [[ON|Options][$SFSaveRepair = 1]]|[[OFF|Options][$SFSaveRepair = 0]]
-<</if>> //If the SF barracks has disappeared leave it enabled then run BC. Else disable and then run BC.//
 
 <br>
 
-- 
GitLab