From 74211230d0ccd04a2b9d05b079664f61e930d072 Mon Sep 17 00:00:00 2001 From: DCoded <dcoded@live.com> Date: Tue, 26 Mar 2019 21:14:19 -0400 Subject: [PATCH] Converted amputeeDescription to JS --- .../nursery/longChildDescription.tw | 2 +- src/js/descriptionWidgets.js | 34 +++++++++++++++++++ src/uncategorized/longSlaveDescription.tw | 2 +- src/utility/descriptionWidgetsFlesh.tw | 24 ------------- 4 files changed, 36 insertions(+), 26 deletions(-) diff --git a/src/facilities/nursery/longChildDescription.tw b/src/facilities/nursery/longChildDescription.tw index fe2bf611ffa..5976eee141f 100644 --- a/src/facilities/nursery/longChildDescription.tw +++ b/src/facilities/nursery/longChildDescription.tw @@ -886,7 +886,7 @@ is <br> <<if $activeChild.amp != 0>> - <<amputeeDescription>> + <<= App.Desc.Amputee($activeChild)>> <</if>> <<ClothingDescription>> diff --git a/src/js/descriptionWidgets.js b/src/js/descriptionWidgets.js index 6414d1543de..8d16d6c5c8f 100644 --- a/src/js/descriptionWidgets.js +++ b/src/js/descriptionWidgets.js @@ -650,4 +650,38 @@ App.Desc.Brand = /** @param {App.Entity.SlaveState} slave */ function (slave) { } } return r; +} + +App.Desc.Amputee = /**@param {App.Entity.SlaveState} slave */ function (slave) { + "use strict"; + const V = State.variables; + let r = ``; + var pronouns = getPronouns(slave); + var he = pronouns.pronoun; + var him = pronouns.object; + var his = pronouns.possessive; + var hers = pronouns.possessivePronoun; + var himself = pronouns.objectReflexive; + var boy = pronouns.noun; + var He = capFirstChar(he); + var His = capFirstChar(his); + + if (slave.amp) { + if (slave.amp === -1) { + r += `${slave.slaveName} is a <span class=pink>quadruple amputee,</span> but ${he}'s equipped with a set of modern prosthetic limbs that allow ${him} a fairly normal life.`; + } else if (slave.amp === -2) { + r += `${slave.slaveName} is a <span class=pink>quadruple amputee,</span> but ${he}'s equipped with P-Limbs customized for sex. ${His} fingertips vibrate, ${his} finger joints are masked to prevent pinching, and ${his} hands can dispense lube.`; + } else if (slave.amp === -3) { + r += `${slave.slaveName} is a <span class=pink>quadruple amputee,</span> but ${he}'s equipped with P-Limbs customized to look natural. They are covered in a material that closely mimics living ${slave.skin} skin, and their servos are noise dampened.`; + } else if (slave.amp === -4) { + r += `${slave.slaveName} is a <span class=pink>quadruple amputee,</span> but ${he}'s equipped with P-Limbs customized for combat. They're hardened, strengthened, and more responsive, and they conceal taser knuckles and extensible forearm blades.`; + } else if (slave.amp === -5) { + r += `${slave.slaveName} is a <span class=pink>quadruple amputee,</span> but ${he}'s equipped with advanced cybernetic P-Limbs. The ultimate fusion of combat effectiveness and instruments of pleasure, they're capable of performing multiple functions. They can enhance sex through ${his} vibrating hands and increase ${his} combat skills with hardened, yet flexible artificial muscles. They have an advanced artificial skin that can send electrical impulses that can cause stimulation or extreme pain.`; + } else if (slave.amp > 0) { + r += `${slave.slaveName} is a <span class=pink>quadruple amputee,</span> making ${him} a convenient torso-only sex toy.`; + } else { + r += `The most obvious thing about ${slave.slaveName} is that ${he} is a <span class=pink>quadruple amputee:</span> ${he} has neither arms nor legs.`; + } + } + return r; } \ No newline at end of file diff --git a/src/uncategorized/longSlaveDescription.tw b/src/uncategorized/longSlaveDescription.tw index a361713ea53..9a0d07896ba 100644 --- a/src/uncategorized/longSlaveDescription.tw +++ b/src/uncategorized/longSlaveDescription.tw @@ -1689,7 +1689,7 @@ is <br> <<if $activeSlave.amp != 0>> - <<amputeeDescription>> + <<= App.Desc.Amputee($activeSlave)>> <</if>> <<ClothingDescription>> diff --git a/src/utility/descriptionWidgetsFlesh.tw b/src/utility/descriptionWidgetsFlesh.tw index 46ae71d8f86..81db3a08a53 100644 --- a/src/utility/descriptionWidgetsFlesh.tw +++ b/src/utility/descriptionWidgetsFlesh.tw @@ -17865,30 +17865,6 @@ $He has <</widget>> - -<<widget "amputeeDescription">> - -<<if $activeSlave.amp != 0>> - <<if $activeSlave.amp == -1>> - $activeSlave.slaveName is a @@.pink;quadruple amputee,@@ but $he's equipped with a set of modern prosthetic limbs that allow $him a fairly normal life. - <<elseif $activeSlave.amp == -2>> - $activeSlave.slaveName is a @@.pink;quadruple amputee,@@ but $he's equipped with P-Limbs customized for sex. $His fingertips vibrate, $his finger joints are masked to prevent pinching, and $his hands can dispense lube. - <<elseif $activeSlave.amp == -3>> - $activeSlave.slaveName is a @@.pink;quadruple amputee,@@ but $he's equipped with P-Limbs customized to look natural. They are covered in a material that closely mimics living $activeSlave.skin skin, and their servos are noise dampened. - <<elseif $activeSlave.amp == -4>> - $activeSlave.slaveName is a @@.pink;quadruple amputee,@@ but $he's equipped with P-Limbs customized for combat. They're hardened, strengthened, and more responsive, and they conceal taser knuckles and extensible forearm blades. - <<elseif $activeSlave.amp == -5>> - $activeSlave.slaveName is a @@.pink;quadruple amputee,@@ but $he's equipped with advanced cybernetic P-Limbs. The ultimate fusion of combat effectiveness and instruments of pleasure, they're capable of performing multiple functions. They can enhance sex through $his vibrating hands and increase $his combat skills with hardened, yet flexible artificial muscles. They have an advanced artificial skin that can send electrical impulses that can cause stimulation or extreme pain. - <<elseif $activeSlave.fuckdoll > 0>> - $activeSlave.slaveName is a @@.pink;quadruple amputee,@@ making $him a convenient torso-only sex toy. - <<else>> - The most obvious thing about $activeSlave.slaveName is that $he is a @@.pink;quadruple amputee:@@ $he has neither arms nor legs. - <</if>> -<</if>> - -<</widget>> - - <<widget "boobsShapeDescription">> <<if $showImplantEffects == 1>> -- GitLab