From cb21f68846f2aead18800c42b0d956437d4f165e Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Fri, 5 Jun 2020 21:10:00 -0400
Subject: [PATCH] vaginal attachment

---
 src/interaction/wardrobeUse.js                |  2 +-
 .../descriptions/crotch/vaginalAccessory.js   | 26 +++++++++++++++++++
 src/utility/descriptionWidgetsStyle.tw        | 21 ---------------
 3 files changed, 27 insertions(+), 22 deletions(-)
 delete mode 100644 src/utility/descriptionWidgetsStyle.tw

diff --git a/src/interaction/wardrobeUse.js b/src/interaction/wardrobeUse.js
index 0cef5bc29b8..1acdaf331cc 100644
--- a/src/interaction/wardrobeUse.js
+++ b/src/interaction/wardrobeUse.js
@@ -663,7 +663,7 @@ App.UI.Wardrobe.vaginalAttachment = function(slave) {
 	} else if (slave.vaginalAccessory === "none") {
 		return jQuery('#vaginalAttachment').empty();
 	}
-	// <<vaginalAttachmentDescription>>
+	// App.Desc.vaginalAccessory(slave);
 
 	const {
 		// eslint-disable-next-line no-unused-vars
diff --git a/src/npc/descriptions/crotch/vaginalAccessory.js b/src/npc/descriptions/crotch/vaginalAccessory.js
index 82997f254a2..cf962840817 100644
--- a/src/npc/descriptions/crotch/vaginalAccessory.js
+++ b/src/npc/descriptions/crotch/vaginalAccessory.js
@@ -96,3 +96,29 @@ App.Desc.vaginalAccessory = function(slave) {
 
 	return r.join(" ");
 };
+
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}
+ */
+App.Desc.vaginalAccessory = function(slave) {
+	const r = [];
+	const {
+		his, He, His
+	} = getPronouns(slave);
+	switch (slave.vaginalAttachment) {
+		case "vibrator":
+			// TODO: not sure about this description
+			r.push(`${He} looks distinctly uncomfortable as ${his} dildo buzzes every so often.`);
+			if (slave.chastityVagina) {
+				r.push(`The chastity belt locking it in place means there is no escape.`);
+			}
+			// TODO: add descriptions for slaves with gaping+ vaginas
+			break;
+		default:
+			if (slave.vaginalAccessory !== "none") {
+				r.push(`${His} current accessory is silent.`);
+			}
+	}
+	return r.join(" ");
+};
diff --git a/src/utility/descriptionWidgetsStyle.tw b/src/utility/descriptionWidgetsStyle.tw
deleted file mode 100644
index dc5f59f7ed1..00000000000
--- a/src/utility/descriptionWidgetsStyle.tw
+++ /dev/null
@@ -1,21 +0,0 @@
-:: clothing description widgets [widget nobr]
-
-<<widget "vaginalAccessoryDescription">>
-<</widget>>
-
-<<widget "vaginalAttachmentDescription">>
-<<switch $activeSlave.vaginalAttachment>>
-<<case "vibrator">>
-	/* TODO: not sure about this description */
-	$He looks distinctly uncomfortable as $his dildo buzzes every so often.
-	<<if $activeSlave.chastityVagina>>
-		The chastity belt locking it in place means there is no escape.
-	<</if>>
-	/* TODO: add descriptions for slaves with gaping+ vaginas */
-<<default>>
-	<<if $activeSlave.vaginalAccessory != "none">>
-		$His current accessory is silent.
-	<</if>>
-<</switch>>
-<</widget>>
-
-- 
GitLab