From 06e22e461d03c3f25edd18731ef2fc29e078fced Mon Sep 17 00:00:00 2001
From: Svornost <11434-svornost@users.noreply.gitgud.io>
Date: Tue, 16 Feb 2021 14:41:31 -0800
Subject: [PATCH] Pubic hair fixes - sync wispy ages between art and
 descriptions, drop extra parentheses from descriptions, fix bodysuit pubic
 hair hiding

---
 src/art/vector/VectorArtJS.js                 | 71 ++-----------------
 .../vector_revamp/vectorRevampedArtControl.js |  4 +-
 src/npc/descriptions/crotch/vagina.js         | 18 ++---
 3 files changed, 17 insertions(+), 76 deletions(-)

diff --git a/src/art/vector/VectorArtJS.js b/src/art/vector/VectorArtJS.js
index 71b8573f961..917be93f08f 100644
--- a/src/art/vector/VectorArtJS.js
+++ b/src/art/vector/VectorArtJS.js
@@ -2739,82 +2739,21 @@ App.Art.vectorArtElement = (function() {
 	}
 
 	function ArtVectorPubicHair() {
-		if (slave.fuckdoll !== 0 || slave.clothes !== "a latex catsuit") {
+		if (slave.fuckdoll === 0 && !["a latex catsuit", "a comfortable bodysuit", "a tight Imperial bodysuit"].includes(slave.clothes)) {
 			if (V.showBodyMods === 1 && slave.vaginaTat === "rude words") {
 				svgQueue.add("Art_Vector_Pussy_Tattoo");
 			}
-			if (slave.physicalAge < 11) {
+			const pubertyAge = Math.min(slave.pubertyAgeXX, slave.pubertyAgeXY);
+			if (slave.physicalAge < pubertyAge - 1) {
 				/* these art files exist, but draw empty svg's. Commented out for now to save on rendering time
 				svgQueue.add("Art_Vector_Pubic_Hair_None");
 				svgQueue.add("Art_Vector_Pubic_Hair_Underarm_None");
 				*/
-			} else if (slave.physicalAge <= 13) {
+			} else if (slave.physicalAge < pubertyAge) {
 				if (slave.pubicHStyle !== "waxed" && slave.pubicHStyle !== "bald" && slave.pubicHStyle !== "hairless") {
 					svgQueue.add("Art_Vector_Pubic_Hair_Wispy");
 				}
-			} else if (slave.clothes !== "a comfortable bodysuit") {
-				switch (slave.pubicHStyle) {
-					case "bald":
-					case "hairless":
-					case "waxed":
-						/* commented out to save on rendering time
-						svgQueue.add("Art_Vector_Pubic_Hair_None");
-						*/
-						break;
-					case "strip":
-					case "in a strip":
-						if (torsoSize === "Obese" || torsoSize === "Fat") {
-							svgQueue.add("Art_Vector_Pubic_Hair_StripFat");
-						} else {
-							svgQueue.add("Art_Vector_Pubic_Hair_Strip");
-						}
-						break;
-					case "neat":
-						if (torsoSize === "Obese" || torsoSize === "Fat") {
-							svgQueue.add("Art_Vector_Pubic_Hair_NeatFat");
-						} else {
-							svgQueue.add("Art_Vector_Pubic_Hair_Neat");
-						}
-						break;
-					case "bushy in the front and neat in the rear":
-						if (torsoSize === "Obese" || torsoSize === "Fat") {
-							svgQueue.add("Art_Vector_Pubic_Hair_BushFat");
-						} else {
-							svgQueue.add("Art_Vector_Pubic_Hair_Bush");
-						}
-						break;
-					case "bushy":
-						if (torsoSize === "Obese" || torsoSize === "Fat") {
-							svgQueue.add("Art_Vector_Pubic_Hair_BushyFat");
-						} else {
-							svgQueue.add("Art_Vector_Pubic_Hair_Bushy");
-						}
-						break;
-					case "very bushy":
-						if (torsoSize === "Obese" || torsoSize === "Fat") {
-							svgQueue.add("Art_Vector_Pubic_Hair_Very_BushyFat");
-						} else {
-							svgQueue.add("Art_Vector_Pubic_Hair_Very_Bushy");
-						}
-				}
-				switch (slave.underArmHStyle) {
-					case "hairless":
-					case "waxed":
-					case "bald":
-						/* commented out to save on rendering time
-						svgQueue.add("Art_Vector_Pubic_Hair_Underarm_None");
-						*/
-						break;
-					case "shaved":
-						svgQueue.add("Art_Vector_Pubic_Hair_Underarm_Shaved");
-						break;
-					case "neat":
-						svgQueue.add("Art_Vector_Pubic_Hair_Underarm_Neat");
-						break;
-					case "bushy":
-						svgQueue.add("Art_Vector_Pubic_Hair_Underarm_Bushy");
-				}
-			} else if (slave.clothes !== "a tight Imperial bodysuit") {
+			} else {
 				switch (slave.pubicHStyle) {
 					case "bald":
 					case "hairless":
diff --git a/src/art/vector_revamp/vectorRevampedArtControl.js b/src/art/vector_revamp/vectorRevampedArtControl.js
index 86a52e74ebf..b4052acee0c 100644
--- a/src/art/vector_revamp/vectorRevampedArtControl.js
+++ b/src/art/vector_revamp/vectorRevampedArtControl.js
@@ -2841,7 +2841,9 @@ class RevampedArtControl {
 			return result;
 		}
 
-		if (this.artSlave.physicalAge < 12) {
+		const pubertyAge = Math.min(this.artSlave.pubertyAgeXX, this.artSlave.pubertyAgeXY);
+		// TODO: Wispy pubic hair for the year before puberty
+		if (this.artSlave.physicalAge < pubertyAge) {
 			return result;
 		}
 
diff --git a/src/npc/descriptions/crotch/vagina.js b/src/npc/descriptions/crotch/vagina.js
index f2d81c77964..af75462fbcf 100644
--- a/src/npc/descriptions/crotch/vagina.js
+++ b/src/npc/descriptions/crotch/vagina.js
@@ -636,14 +636,14 @@ App.Desc.vagina = function(slave) {
 
 	r.push(App.Desc.mods(slave, "pubic mound"));
 
-	let _pubertyAge = Math.min(slave.pubertyAgeXX, slave.pubertyAgeXY);
+	const _pubertyAge = Math.min(slave.pubertyAgeXX, slave.pubertyAgeXY);
 	if (slave.physicalAge < _pubertyAge - 2) {
 		r.push(`${He} is too sexually immature to have pubic hair.`);
-	} else if ((slave.pubicHStyle === "hairless")) {
+	} else if (slave.pubicHStyle === "hairless") {
 		r.push(`${He}'s naturally smooth and hairless.`);
-	} else if ((slave.pubicHStyle === "bald")) {
+	} else if (slave.pubicHStyle === "bald") {
 		r.push(`${He} is no longer able to grow pubic hair leaving ${him} hairless and smooth.`);
-	} else if ((slave.pubicHStyle === "waxed")) {
+	} else if (slave.pubicHStyle === "waxed") {
 		if (slave.fuckdoll > 0) {
 			r.push(`${His} pubic hair has been removed to prevent chafing.`);
 		} else if ((slave.assignment === "work in the dairy") && (V.dairyRestraintsSetting > 1)) {
@@ -662,7 +662,7 @@ App.Desc.vagina = function(slave) {
 		} else {
 			r.push(`pussy.`);
 		}
-	} else if ((slave.pubicHStyle === "in a strip")) {
+	} else if (slave.pubicHStyle === "in a strip") {
 		r.push(`${His} ${slave.pubicHColor} pubic hair is waxed into a narrow strip above ${his}`);
 		if (slave.dick > 0) {
 			r.push(`cock.`);
@@ -671,7 +671,7 @@ App.Desc.vagina = function(slave) {
 		} else {
 			r.push(`pussy.`);
 		}
-	} else if ((slave.pubicHStyle === "neat")) {
+	} else if (slave.pubicHStyle === "neat") {
 		r.push(`${His} ${slave.pubicHColor} pubic hair is waxed into a neat patch above ${his}`);
 		if (slave.dick > 0) {
 			r.push(`cock.`);
@@ -680,7 +680,7 @@ App.Desc.vagina = function(slave) {
 		} else {
 			r.push(`pussy.`);
 		}
-	} else if ((slave.pubicHStyle === "bushy in the front and neat in the rear")) {
+	} else if (slave.pubicHStyle === "bushy in the front and neat in the rear") {
 		r.push(`${His} ${slave.pubicHColor} pubic hair forms a natural bush above ${his}`);
 		if (slave.dick > 0) {
 			r.push(`cock.`);
@@ -689,7 +689,7 @@ App.Desc.vagina = function(slave) {
 		} else {
 			r.push(`pussy.`);
 		}
-	} else if ((slave.pubicHStyle === "bushy")) {
+	} else if (slave.pubicHStyle === "bushy") {
 		r.push(`${His} ${slave.pubicHColor} pubic hair forms a natural bush above ${his}`);
 		if (slave.dick > 0) {
 			r.push(`cock.`);
@@ -698,7 +698,7 @@ App.Desc.vagina = function(slave) {
 		} else {
 			r.push(`pussy.`);
 		}
-	} else if ((slave.pubicHStyle === "very bushy")) {
+	} else if (slave.pubicHStyle === "very bushy") {
 		r.push(`${His} ${slave.pubicHColor} pubic hair forms a dense bush above ${his}`);
 		if (slave.dick > 0) {
 			r.push(`cock`);
-- 
GitLab