From 851db9d6e32befb82ccd144aa176008130de15c8 Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Fri, 5 Mar 2021 12:05:29 -0500
Subject: [PATCH] HG abortion permissions

---
 Changelog.txt                                      | 2 ++
 js/003-data/gameVariableData.js                    | 1 +
 src/002-config/fc-version.js                       | 2 +-
 src/data/backwardsCompatibility/datatypeCleanup.js | 3 +++
 src/endWeek/saLiveWithHG.js                        | 2 +-
 src/uncategorized/headGirlSuite.tw                 | 9 ++++++++-
 6 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/Changelog.txt b/Changelog.txt
index 943beb80504..37d95df5dc5 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -2,6 +2,8 @@ Pregmod
 
 0.10.7.1-3.9.x
 
+	-added HG abortion permissions
+
 	03/02/2021
 
 	0
diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js
index 14621008d8b..4639fdd0e95 100644
--- a/js/003-data/gameVariableData.js
+++ b/js/003-data/gameVariableData.js
@@ -672,6 +672,7 @@ App.Data.resetOnNGPlus = {
 	HGSuite: 0,
 	HGSuiteSurgery: 1,
 	HGSuiteDrugs: 1,
+	HGSuiteAbortion: 1,
 	HGSuiteHormones: 1,
 	HGSuiteEquality: 0,
 	HGSuiteName: "the Head Girl Suite",
diff --git a/src/002-config/fc-version.js b/src/002-config/fc-version.js
index 96fc2946394..d62bff94e89 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.9.0",
 	commitHash: null,
-	release: 1118 // When getting close to 2000,  please remove the check located within the onLoad() function defined at line five of src/js/eventHandlers.js.
+	release: 1119 // When getting close to 2000,  please remove the check located within the onLoad() function defined at line five of src/js/eventHandlers.js.
 };
diff --git a/src/data/backwardsCompatibility/datatypeCleanup.js b/src/data/backwardsCompatibility/datatypeCleanup.js
index 5ecbed5c0c2..605e35f3d01 100644
--- a/src/data/backwardsCompatibility/datatypeCleanup.js
+++ b/src/data/backwardsCompatibility/datatypeCleanup.js
@@ -1763,6 +1763,9 @@ globalThis.FacilityDatatypeCleanup = (function() {
 		if (V.HGSuiteDrugs !== 0) {
 			V.HGSuiteDrugs = 1;
 		}
+		if (V.HGSuiteAbortion !== 0) {
+			V.HGSuiteAbortion = 1;
+		}
 		if (V.HGSuiteHormones !== 0) {
 			V.HGSuiteHormones = 1;
 		}
diff --git a/src/endWeek/saLiveWithHG.js b/src/endWeek/saLiveWithHG.js
index a2ab0827c54..60ae5ed0689 100644
--- a/src/endWeek/saLiveWithHG.js
+++ b/src/endWeek/saLiveWithHG.js
@@ -587,7 +587,7 @@ App.SlaveAssignment.liveWithHG = (function() {
 					r.push(`${HG.slaveName} has no interest in a slut stuffed full of unwanted spawn, so ${he2} promptly doses ${slave.slaveName} with labor inducing agents to get ${him} back in fucking shape.`);
 					induce(slave);
 					startLabor(slave);
-				} else {
+				} else if (HGSuiteAbortion) {
 					r.push(`${HG.slaveName} promptly aborts the child growing in ${slave.slaveName} since ${he2} prefers ${his2} ${girl}s not harboring someone else's child or loaded down with ${his2} own unwanted spawn.`);
 					TerminatePregnancy(slave);
 					actX(slave, "abortions");
diff --git a/src/uncategorized/headGirlSuite.tw b/src/uncategorized/headGirlSuite.tw
index 40464394a20..17806411ae0 100644
--- a/src/uncategorized/headGirlSuite.tw
+++ b/src/uncategorized/headGirlSuite.tw
@@ -28,7 +28,7 @@
 		The two slaves living in $HGSuiteName are ''equals,'' and will alternate weeks as Head Girl and Head Girl's bitch. [[Stop|Head Girl Suite][$HGSuiteEquality = 0]]
 	<<else>>
 		The current Head Girl will ''remain Head Girl.''
-		[[Have them alternate|Head Girl Suite][$HGSuiteEquality = 1,$HGSuiteSurgery = 0,$HGSuiteDrugs = 0,$HGSuiteHormones = 0]]
+		[[Have them alternate|Head Girl Suite][$HGSuiteEquality = 1,$HGSuiteSurgery = 0,$HGSuiteDrugs = 0,$HGSuiteAbortion = 0,$HGSuiteHormones = 0]]
 		<span class="note">
 			This will only take effect if the other slave is an appropriate candidate
 		</span>
@@ -39,6 +39,13 @@
 				$He is ''not allowed'' to use surgical modification on $his slave. [[Allow|Head Girl Suite][$HGSuiteSurgery = 1]]
 			<</if>>
 		</div>
+		<div class="choices">
+			<<if $HGSuiteAbortion == 1>>
+				$He is ''allowed'' to terminate unwanted pregnancies in $his slave. [[Disallow|Head Girl Suite][$HGSuiteAbortion = 0]]
+			<<else>>
+				$He is ''not allowed'' to terminate unwanted pregnancies in $his slave. [[Allow|Head Girl Suite][$HGSuiteAbortion = 1]]
+			<</if>>
+		</div>
 		<div class="choices">
 			<<if $HGSuiteDrugs == 1>>
 				$He is ''allowed'' to use growth hormones on $his slave. [[Disallow|Head Girl Suite][$HGSuiteDrugs = 0]]
-- 
GitLab