From ae7760d8d12a668fd670685f1641ac5afa2fea50 Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Mon, 29 Apr 2019 01:56:11 -0400
Subject: [PATCH] Added toggle for clothing erection bulge art

---
 src/art/vector/VectorArtJS.js | 118 +++++++++++++++++++++++++++++++++-
 src/uncategorized/options.tw  |   6 ++
 2 files changed, 123 insertions(+), 1 deletion(-)

diff --git a/src/art/vector/VectorArtJS.js b/src/art/vector/VectorArtJS.js
index 2bee87c1e63..01ce74f463e 100644
--- a/src/art/vector/VectorArtJS.js
+++ b/src/art/vector/VectorArtJS.js
@@ -248,7 +248,7 @@ window.VectorArt = (function() {
 		penisArtString = "";
 		if (penisSize === undefined) {
 			penisDrawtime = -1; /* no penis to draw */
-		} else {
+		} else if (State.variables.showClothingErection) {
 			penisDrawtime = 0; /* default is to draw before boobs/belly */
 			switch (slave.clothes) {
 				/* BULGE OUTFITS WITH ERECTION: LONG OUTFITS */
@@ -374,6 +374,122 @@ window.VectorArt = (function() {
 							penisArtString += jsInclude(`Art_Vector_Chastity_Cage_${penisSize}`);
 					}
 			}
+		} else {
+			penisDrawtime = 0; /* default is to draw before boobs/belly */
+			switch (slave.clothes) {
+				/* BULGE OUTFITS LONG+MEDIUM OUTFITS */
+				case "a ball gown":
+				case "a biyelgee costume":
+				case "a burkini":
+				case "a burqa":
+				case "a dirndl":
+				case "a halter top dress":
+				case "a hijab and abaya":
+				case "a hijab and blouse":
+				case "a kimono":
+				case "a klan robe":
+				case "a long qipao":
+				case "a maternity dress":
+				case "a military uniform":
+				case "a mounty outfit":
+				case "a nice maid outfit":
+				case "a nice nurse outfit":
+				case "a niqab and abaya":
+				case "a police uniform":
+				case "a red army uniform":
+				case "a schutzstaffel uniform":
+				case "a skimpy loincloth":
+				case "a slave gown":
+				case "a slutty nurse outfit":
+				case "a slutty schutzstaffel uniform":
+				case "a t-shirt and jeans":
+				case "a toga":
+				case "an apron":
+				case "battlearmor":
+				case "battledress":
+				case "conservative clothing":
+				case "jeans":
+				case "leather pants":
+				case "leather pants and a tube top":
+				case "leather pants and pasties":
+				case "lederhosen":
+				case "nice business attire":
+				case "slutty business attire":
+				case "spats and a tank top":
+				case "sport shorts":
+				case "sport shorts and a sports bra":
+				case "sport shorts and a t-shirt":
+				case "stretch pants and a crop-top":
+					penisArtString = jsInclude(`Art_Vector_Bulge_Outfit_${penisSize}`);
+					break;
+				/* BULGE OUTFITS SHORT OUTFITS */
+				case "a bunny outfit":
+				case "a button-up shirt and panties":
+				case "a chattel habit":
+				case "a huipil":
+				case "a leotard":
+				case "a mini dress":
+				case "a monokini":
+				case "a one-piece swimsuit":
+				case "a penitent nuns habit":
+				case "a scalemail bikini":
+				case "a slutty klan robe":
+				case "a slutty maid outfit":
+				case "a slutty outfit":
+				case "a slutty qipao":
+				case "a succubus outfit":
+				case "a sweater and cutoffs":
+				case "a sweater and panties":
+				case "a t-shirt and panties":
+				case "a t-shirt and thong":
+				case "a tank-top and panties":
+				case "a thong":
+				case "a tube top and thong":
+				case "an oversized t-shirt and boyshorts":
+				case "attractive lingerie for a pregnant woman":
+				case "boyshorts":
+				case "cutoffs":
+				case "cutoffs and a t-shirt":
+				case "harem gauze":
+				case "kitty lingerie":
+				case "panties":
+				case "panties and pasties":
+				case "striped panties":
+				case "striped underwear":
+					if (slave.belly <= 4000) {
+						if (slave.dick > 3)
+							penisArtString = jsInclude("Art_Vector_Bulge_Outfit_3");
+						else
+							penisArtString = jsInclude(`Art_Vector_Bulge_Outfit_${penisSize}`);
+					}
+					break;
+				/* hide everything */
+				case "a cheerleader outfit":
+				case "a gothic lolita dress":
+				case "a hanbok":
+				case "a schoolgirl outfit":
+					break;
+				/* full frontal */
+				default:
+					if ((canAchieveErection(slave)) && (slave.chastityPenis !== 1)) {
+						penisDrawtime = 1; /* draw erect penis over boobs if boobs do not hide the penis' base */
+						if (artBoobScaleFactor < 3.7) {
+							if (slave.foreskin !== 0)
+								penisArtString = jsInclude(`Art_Vector_Penis_${penisSize}`);
+							else
+								penisArtString = jsInclude(`Art_Vector_PenisCirc_${penisSize}`);
+						}
+					} else {
+						/* flaccid penises are drawn behind the boobs/belly */
+						if (slave.foreskin !== 0)
+							penisArtString = jsInclude(`Art_Vector_Flaccid_${penisSize}`);
+						else
+							penisArtString = jsInclude(`Art_Vector_FlaccidCirc_${penisSize}`);
+						/* this draws chastity OVER latex catsuit. prndev finds this alright. */
+						if (slave.chastityPenis === 1)
+							penisArtString += jsInclude(`Art_Vector_Chastity_Cage_${penisSize}`);
+					}
+			}
 		}
 	}
 
diff --git a/src/uncategorized/options.tw b/src/uncategorized/options.tw
index 826dfcdf697..b407383f121 100644
--- a/src/uncategorized/options.tw
+++ b/src/uncategorized/options.tw
@@ -76,6 +76,12 @@ Image display
 			@@.cyan;ENABLED@@ on all images. [[Disable|Options][$seeHeight = 0]] | [[Enable only for small images|Options][$seeHeight = 1]]
 		<<else>>
 			@@.red;DISABLED.@@ [[Enable only for small images|Options][$seeHeight = 1]] | [[Enable for all images|Options][$seeHeight = 2]]
+		<</if>><br>
+		Clothing erection bulges
+		<<if $showClothingErection>>
+			@@.cyan;ENABLED@@. [[Disable|Options][$showClothingErection = 0]]
+		<<else>>
+			@@.red;DISABLED.@@ [[Enable|Options][$showClothingErection = 1]]
 		<</if>>
 		<br>@@.red;Git compiled only, no exceptions.@@
 	<<elseif $imageChoice == 2>>
-- 
GitLab