From 4d211a51faed5d7cc8aaa739de53a7ecf2d27b74 Mon Sep 17 00:00:00 2001
From: klorpa <30924131+klorpa@users.noreply.github.com>
Date: Fri, 4 Jan 2019 19:08:01 -0600
Subject: [PATCH] Widgets

---
 devNotes/Useful JS Function Documentation.txt |  2 +-
 devNotes/twine JS.txt                         | 38 ++++++++++++++++++-
 src/js/datatypeCleanupJS.tw                   |  2 +-
 src/js/storyJS.tw                             | 38 ++++++++++++++++++-
 src/npc/acquisition.tw                        | 12 ++++--
 5 files changed, 84 insertions(+), 8 deletions(-)

diff --git a/devNotes/Useful JS Function Documentation.txt b/devNotes/Useful JS Function Documentation.txt
index ee9215b9b4b..08db5f37fcc 100644
--- a/devNotes/Useful JS Function Documentation.txt	
+++ b/devNotes/Useful JS Function Documentation.txt	
@@ -129,7 +129,7 @@ Display Functions:
 
 properTitle() - Returns the player's proper title. (customTitle, Sir, Ma'am)
 
-properMaster() - Returns the slave's title for Master when WrittenMaster() is innappropriate. (customTitle, Master, Mistress)
+properMaster() - Returns the slave's title for Master when WrittenMaster() is inappropriate. (customTitle, Master, Mistress)
 
 SlaveFullName(slave) - Returns the slave's full name.
 
diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt
index 77bbf385158..40426cfc72b 100644
--- a/devNotes/twine JS.txt	
+++ b/devNotes/twine JS.txt	
@@ -1042,6 +1042,42 @@ window.resetFSCredits = function() {
 	V.FSCredits = Math.max(Math.trunc(V.FSGotRepCredits - activeFS), 0);
 };
 
+window.generatePlayerPronouns = function(PC) {
+	if (PC.title === 0)
+		PC.pronoun = "she";
+		PC.possessivePronoun = "hers";
+		PC.possessive = "her";
+		PC.object = "her";
+		PC.objectReflexive = "herself";
+		PC.noun = "woman";
+	} else {
+		PC.pronoun = "he";
+		PC.possessivePronoun = "his";
+		PC.possessive = "his";
+		PC.object = "him";
+		PC.objectReflexive = "himself";
+		PC.noun = "man";
+	}
+};
+
+window.generateAssistantPronouns = function(assistant) {
+	if (assistant === 0)
+		assistant.pronoun = "it";
+		assistant.possessivePronoun = "its";
+		assistant.possessive = "its";
+		assistant.object = "it";
+		assistant.objectReflexive = "itself";
+		assistant.noun = "program";
+	} else {
+		assistant.pronoun = "she";
+		assistant.possessivePronoun = "hers";
+		assistant.possessive = "her";
+		assistant.object = "her";
+		assistant.objectReflexive = "herself";
+		assistant.noun = "girl";
+	}
+};
+
 /*:: itemAvailability [script]*/
 
 /* intended to condense the clothing/toy/etc availability checks into something less asinine */
@@ -37791,7 +37827,7 @@ window.PCDatatypeCleanup = function PCDatatypeCleanup() {
 	PC.mpreg = 0; /* So knockMeUp() may be used with the PC */
 	PC.lactation = Math.max(+PC.lactation, 0) || 0;
 	PC.lactationDuration = Math.max(+PC.lactationDuration, 0) || 0;
-
+	generatePlayerPronouns(PC);
 	if (PC.age !== undefined) {
 		delete PC.age;
 	}
diff --git a/src/js/datatypeCleanupJS.tw b/src/js/datatypeCleanupJS.tw
index 55d221bf9ac..ef55f971467 100644
--- a/src/js/datatypeCleanupJS.tw
+++ b/src/js/datatypeCleanupJS.tw
@@ -1177,9 +1177,9 @@ window.PCDatatypeCleanup = function PCDatatypeCleanup() {
 	PC.staminaPills = Math.clamp(+PC.staminaPills, 0, 1) || 0;
 	PC.storedCum = Math.max(+PC.storedCum, 0) || 0;
 	PC.mpreg = 0; /* So knockMeUp() may be used with the PC */
-
 	PC.lactation = Math.max(+PC.lactation, 0) || 0;
 	PC.lactationDuration = Math.max(+PC.lactationDuration, 0) || 0;
+	generatePlayerPronouns(PC);
 
 	if (PC.age !== undefined) {
 		delete PC.age;
diff --git a/src/js/storyJS.tw b/src/js/storyJS.tw
index 8705bc8e030..59a9f647d93 100644
--- a/src/js/storyJS.tw
+++ b/src/js/storyJS.tw
@@ -298,7 +298,7 @@ window.canImpreg = function(slave1, slave2) {
 	} else if (slave1.ID === -1) {
 		if (slave2.ballType != "human") {
 			return false;
-		} else if (!isPlayerFertile(slave1)) {
+		} else if (!isFertile(slave1)) {
 			return false;
 		} else {
 			return true;
@@ -1039,3 +1039,39 @@ window.resetFSCredits = function() {
 	}
 	V.FSCredits = Math.max(Math.trunc(V.FSGotRepCredits - activeFS), 0);
 };
+
+window.generatePlayerPronouns = function(PC) {
+	if (PC.title === 0)
+		PC.pronoun = "she";
+		PC.possessivePronoun = "hers";
+		PC.possessive = "her";
+		PC.object = "her";
+		PC.objectReflexive = "herself";
+		PC.noun = "woman";
+	} else {
+		PC.pronoun = "he";
+		PC.possessivePronoun = "his";
+		PC.possessive = "his";
+		PC.object = "him";
+		PC.objectReflexive = "himself";
+		PC.noun = "man";
+	}
+};
+
+window.generateAssistantPronouns = function(assistant) {
+	if (assistant === 0)
+		assistant.pronoun = "it";
+		assistant.possessivePronoun = "its";
+		assistant.possessive = "its";
+		assistant.object = "it";
+		assistant.objectReflexive = "itself";
+		assistant.noun = "program";
+	} else {
+		assistant.pronoun = "she";
+		assistant.possessivePronoun = "hers";
+		assistant.possessive = "her";
+		assistant.object = "her";
+		assistant.objectReflexive = "herself";
+		assistant.noun = "girl";
+	}
+};
diff --git a/src/npc/acquisition.tw b/src/npc/acquisition.tw
index 67dd4c64be9..388cc7a5325 100644
--- a/src/npc/acquisition.tw
+++ b/src/npc/acquisition.tw
@@ -37,14 +37,14 @@
 			<</if>>
 			<<set $PC.geneticQuirks.fertility = 2>>
 			<<for $i = 0; $i < $slaves.length; $i++>>
-				<<if $slaves[$i].origin == "She was another of your late master's servants. She spent nine months in your womb, courtesy of your master." || $slaves[$i].origin == "Your late master took pleasure in using his servants in creative ways. He inseminated you with your own sperm, and nine months later, your daughter was born.">>
+				<<if $slaves[$i].origin == "She was another of your late master's servants. She spent nine months in your womb, courtesy of your master.">>
 				<<set $PC.births += 1>>
 				<<set $PC.birthMaster += 1>>
 				<</if>>
 			<</for>>
 		<<elseif $PC.career == "escort">>
 			<<for $i = 0; $i < $slaves.length; $i++>>
-				<<if $slaves[$i].origin == "She was the result of unprotected sex with a client. He paid you quite well to enjoy your body as you grew heavy with his child." || $slaves[$i].origin == "A client paid you a large sum of credits to prove you could literally fuck yourself. She is the result of that lucrative night.">>
+				<<if $slaves[$i].origin == "She was the result of unprotected sex with a client. He paid you quite well to enjoy your body as you grew heavy with his child.">>
 				<<set $PC.births += 1>>
 				<<set $PC.birthClient += 1>>
 				<</if>>
@@ -52,8 +52,12 @@
 		<<else>>
 			<<for $i = 0; $i < $slaves.length; $i++>>
 				<<if $slaves[$i].mother == -1>>
-				<<set $PC.births += 1>>
-				<<set $PC.birthOther += 1>>
+					<<set $PC.births += 1>>
+					<<if $slaves[$i].father == -1>>
+						<<set $PC.birthSelf += 1>>
+					<<else>>
+						<<set $PC.birthOther += 1>>
+					<</if>>
 				<</if>>
 			<</for>>
 		<</if>>
-- 
GitLab