From c5f766a2182f9124061bef398922a9d9d970054c Mon Sep 17 00:00:00 2001
From: klorpa <30924131+klorpa@users.noreply.github.com>
Date: Thu, 8 Nov 2018 21:21:33 -0600
Subject: [PATCH] Space Fixes And More

---
 devNotes/twine JS.txt                      | 53 ++++++++++++++--------
 src/SpecialForce/JS.js                     |  4 +-
 src/js/vignettes.tw                        | 43 ++++++++++++------
 src/js/walkPastJS.tw                       |  2 +-
 src/utility/descriptionWidgetsFlesh.tw     |  4 +-
 src/utility/descriptionWidgetsPiercings.tw |  2 +-
 6 files changed, 69 insertions(+), 39 deletions(-)

diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt
index 8a07ee062f3..9d20462a885 100644
--- a/devNotes/twine JS.txt	
+++ b/devNotes/twine JS.txt	
@@ -320,7 +320,7 @@ window.isFertile = function(slave) {
 	if (slave.womb.length > 0 && slave.superfetation < 1 && slave.ovaImplant < 1) { /* currently pregnant without superfetation */
 		return false;
 	} else if (slave.womb.length > 0) { /* temp failure condition to prevent current double preg bug */
-	    return false;
+		return false;
 	} else if (slave.broodmother > 0) { /* currently broodmother */
 		return false;
 	} else if (slave.preg < -1) { /* sterile */
@@ -29932,7 +29932,15 @@ window.GetVignette = function GetVignette(slave) {
 			type: "rep",
 			effect: 0,
 		});
-	} else if (slave.assignment === "rest" || slave.assignment === "rest in the spa") {
+	} else if (slave.assignment === "rest" || slave.assignment === "rest in the spa" || slave.assignment === "be the Attendant") {
+		switch (slave.behavioralFlaw) {
+			case "anorexic":
+				vignettes.push({
+					text: `with nothing to do, ${he} lies in bed and eats almost nothing,`,
+					type: "health",
+					effect: -1,
+				});
+		}
 		if (slave.devotion > 95) {
 			vignettes.push({
 				text: `${he} decided to spend some of ${his} free time to praise you on the streets,`,
@@ -29998,20 +30006,27 @@ window.GetVignette = function GetVignette(slave) {
 			});
 		}
 		if (slave.energy > 95) {
-		    if (canWalk(slave)) {
-		        if (slave.amp !== 0) {
-                    vignettes.push({
-                        text: `${he} was so horny that ${he} sleepwalked into your room and performed oral sex on you, and then woke up when ${he} bruised ${his} shin,`,
-                        type: "health",
-                        effect: -1,
-                    });
-                }
-                vignettes.push({
-                    text: `due to the obvious difficulties in ${his} mobility, ${he} spent a lot of time masturbing in bed,`,
-                    type: "health",
-                    effect: 0,
-                });
-            }
+			if (slave.behavioralFlaw === "odd") {
+				vignettes.push({
+					text: `you discovered ${him} sketching an image of ${his} genitalia, which you managed to sell,`,
+					type: "cash",
+					effect: 1,
+				});
+			}
+			if (canWalk(slave)) {
+				if (slave.amp !== 0) {
+					vignettes.push({
+						text: `${he} was so horny that ${he} sleepwalked into your room and performed oral sex on you, and then woke up when ${he} bruised ${his} shin,`,
+						type: "health",
+						effect: -1,
+					});
+				}
+				vignettes.push({
+					text: `due to the obvious difficulties in ${his} mobility, ${he} spent a lot of time masturbating in bed,`,
+					type: "health",
+					effect: 0,
+				});
+			}
 		}
 		if (slave.health < -20) {
 			vignettes.push({
@@ -33336,7 +33351,7 @@ window.AA = function() {
 	if (S.AA >= 6) group = `A respectable number of attack VTOL protect your arcology, split into a few squadrons`;
 	if (S.AA >= 7) support = ` attack ground targets`, W2 = `, rocket pods, and air-to-air missiles,`;
 	if (S.AA >= 8) stealth = `The old skin has been replaced with a radar-absorbent material, making the aircraft difficult to pick up on radar.`;
-	if (S.AA >= 9)  scramble = `The VTOLs can scramble to react to any threat in under three minutes.`;
+	if (S.AA >= 9) scramble = `The VTOLs can scramble to react to any threat in under three minutes.`;
 	if (S.AA >= 10)	PAI = `A piloting AI has been installed, allowing the VTOLs to perform impossible maneuvers that cannot be done by a human pilot. This removes the need for a human in the aircraft altogether.`;
 
 	return `${group}. Several of the landing pads around $arcologies[0].name host groups of four fighters, ready to defend the arcology. ${scramble} The attack VTOL are currently ${W1} with a Gatling cannon${W2} ${W3}${support}. ${TAI} ${PAI} ${engines} ${lock} ${stealth}`;
@@ -33520,7 +33535,7 @@ window.Interactions = function() {
 		else if (V.choice == 3){
 			choice = `$SF.Caps will be conducting corporate sabotage on rival arcologies' businesses. `;
 			if (V.SFTradeShow.CanAttend === -1 && (C.Talk + C.Fun !== 1)) {
-			choice += `"Our interests should see a  @@.yellowgreen;big boost@@, boss."`;}
+			choice += `"Our interests should see a @@.yellowgreen;big boost@@, boss."`;}
 			else { 
 			choice += `"Your @@.yellowgreen;arcology's business prospects should see an improvement@@ this week, <<print PCTitle()>>.`;
 			}}}
@@ -33960,7 +33975,7 @@ window.walkPasts = function(slave, _seed) {
 		} else {
 			t += "being held down and "
 			if (canDoAnal(slave)) {
-				t += "buttfucked  "
+				t += "buttfucked "
 			} else {
 				t += "raped "
 			}
diff --git a/src/SpecialForce/JS.js b/src/SpecialForce/JS.js
index 81b4b131eeb..be12853a084 100644
--- a/src/SpecialForce/JS.js
+++ b/src/SpecialForce/JS.js
@@ -219,7 +219,7 @@ window.AA = function() {
 	if (S.AA >= 6) group = `A respectable number of attack VTOL protect your arcology, split into a few squadrons`;
 	if (S.AA >= 7) support = ` attack ground targets`, W2 = `, rocket pods, and air-to-air missiles,`;
 	if (S.AA >= 8) stealth = `The old skin has been replaced with a radar-absorbent material, making the aircraft difficult to pick up on radar.`;
-	if (S.AA >= 9)  scramble = `The VTOLs can scramble to react to any threat in under three minutes.`;
+	if (S.AA >= 9) scramble = `The VTOLs can scramble to react to any threat in under three minutes.`;
 	if (S.AA >= 10)	PAI = `A piloting AI has been installed, allowing the VTOLs to perform impossible maneuvers that cannot be done by a human pilot. This removes the need for a human in the aircraft altogether.`;
 
 	return `${group}. Several of the landing pads around $arcologies[0].name host groups of four fighters, ready to defend the arcology. ${scramble} The attack VTOL are currently ${W1} with a Gatling cannon${W2} ${W3}${support}. ${TAI} ${PAI} ${engines} ${lock} ${stealth}`;
@@ -403,7 +403,7 @@ window.Interactions = function() {
 		else if (V.choice == 3){
 			choice = `$SF.Caps will be conducting corporate sabotage on rival arcologies' businesses. `;
 			if (V.SFTradeShow.CanAttend === -1 && (C.Talk + C.Fun !== 1)) {
-			choice += `"Our interests should see a  @@.yellowgreen;big boost@@, boss."`;}
+			choice += `"Our interests should see a @@.yellowgreen;big boost@@, boss."`;}
 			else { 
 			choice += `"Your @@.yellowgreen;arcology's business prospects should see an improvement@@ this week, <<= properTitle()>>.`;
 			}}}
diff --git a/src/js/vignettes.tw b/src/js/vignettes.tw
index a545561e992..b58233b60df 100644
--- a/src/js/vignettes.tw
+++ b/src/js/vignettes.tw
@@ -3315,6 +3315,14 @@ window.GetVignette = function GetVignette(slave) {
 			effect: 0,
 		});
 	} else if (slave.assignment === "rest" || slave.assignment === "rest in the spa" || slave.assignment === "be the Attendant") {
+		switch (slave.behavioralFlaw) {
+			case "anorexic":
+				vignettes.push({
+					text: `with nothing to do, ${he} lies in bed and eats almost nothing,`,
+					type: "health",
+					effect: -1,
+				});
+		}
 		if (slave.devotion > 95) {
 			vignettes.push({
 				text: `${he} decided to spend some of ${his} free time to praise you on the streets,`,
@@ -3380,20 +3388,27 @@ window.GetVignette = function GetVignette(slave) {
 			});
 		}
 		if (slave.energy > 95) {
-		    if (canWalk(slave)) {
-		        if (slave.amp !== 0) {
-                    vignettes.push({
-                        text: `${he} was so horny that ${he} sleepwalked into your room and performed oral sex on you, and then woke up when ${he} bruised ${his} shin,`,
-                        type: "health",
-                        effect: -1,
-                    });
-                }
-                vignettes.push({
-                    text: `due to the obvious difficulties in ${his} mobility, ${he} spent a lot of time masturbating in bed,`,
-                    type: "health",
-                    effect: 0,
-                });
-            }
+			if (slave.behavioralFlaw === "odd") {
+				vignettes.push({
+					text: `you discovered ${him} sketching an image of ${his} genitalia, which you managed to sell,`,
+					type: "cash",
+					effect: 1,
+				});
+			}
+			if (canWalk(slave)) {
+				if (slave.amp !== 0) {
+					vignettes.push({
+						text: `${he} was so horny that ${he} sleepwalked into your room and performed oral sex on you, and then woke up when ${he} bruised ${his} shin,`,
+						type: "health",
+						effect: -1,
+					});
+				}
+				vignettes.push({
+					text: `due to the obvious difficulties in ${his} mobility, ${he} spent a lot of time masturbating in bed,`,
+					type: "health",
+					effect: 0,
+				});
+			}
 		}
 		if (slave.health < -20) {
 			vignettes.push({
diff --git a/src/js/walkPastJS.tw b/src/js/walkPastJS.tw
index 5e9f2787b30..a55bbecccd4 100644
--- a/src/js/walkPastJS.tw
+++ b/src/js/walkPastJS.tw
@@ -307,7 +307,7 @@ window.walkPasts = function(slave, _seed) {
 		} else {
 			t += "being held down and "
 			if (canDoAnal(slave)) {
-				t += "buttfucked  "
+				t += "buttfucked "
 			} else {
 				t += "raped "
 			}
diff --git a/src/utility/descriptionWidgetsFlesh.tw b/src/utility/descriptionWidgetsFlesh.tw
index 893df35a621..6bc1ebfef4a 100644
--- a/src/utility/descriptionWidgetsFlesh.tw
+++ b/src/utility/descriptionWidgetsFlesh.tw
@@ -11966,9 +11966,9 @@ $He has
 			<<elseif $activeSlave.weight > 30>>
 				$activeSlave.slaveName's robes totally conceal $his chubby belly.
 			<<elseif $activeSlave.bellyPreg >= 100 || $activeSlave.bellyImplant >= 100>>
-				$activeSlave.slaveName's robes totally conceal  $his belly.
+				$activeSlave.slaveName's robes totally conceal $his belly.
 			<<elseif $activeSlave.muscles > 30>>
-				$activeSlave.slaveName's robes totally conceal  $his abdominal muscles.
+				$activeSlave.slaveName's robes totally conceal $his abdominal muscles.
 			<</if>>
 		<<case "a burqa">>
 			<<if $activeSlave.belly >= 1000000>>
diff --git a/src/utility/descriptionWidgetsPiercings.tw b/src/utility/descriptionWidgetsPiercings.tw
index 366a03543cf..aeb3ff8ac94 100644
--- a/src/utility/descriptionWidgetsPiercings.tw
+++ b/src/utility/descriptionWidgetsPiercings.tw
@@ -18,7 +18,7 @@
 			<<case "a nice pony outfit" "a slutty pony outfit">>
 				$He's wearing horseshoe shaped earrings.
 			<<case "leather pants and pasties" "leather pants" "leather pants and a tube top" "a tube top">>
-				$He's wearing  large hoop earrings.
+				$He's wearing large hoop earrings.
 			<<case "a gothic lolita dress">>
 				$He's wearing black earrings.
 			<<case "a sports bra" "a one-piece swimsuit" "sport shorts and a t-shirt" "sport shorts and a sports bra" "sport shorts">>
-- 
GitLab