From 2032b3b3c332af3dca66e43736b128ba9f4ac498 Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Wed, 6 May 2020 17:59:21 -0700 Subject: [PATCH] Group global enunciation variables in the "enunciate" object instead of blasting them all over the global state. --- js/003-data/gameVariableData.js | 24 +---------- src/js/assayJS.js | 7 +--- src/uncategorized/RESS.tw | 6 +-- src/utility/descriptionWidgetsPiercings.tw | 6 +-- src/utility/miscWidgets.tw | 46 +++++++++++----------- 5 files changed, 31 insertions(+), 58 deletions(-) diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index 82bf8bd01c6..cd67c3ba8ea 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -1561,27 +1561,5 @@ App.Data.ignoreGameStateVariables = [ "he", // Enunciate - "XEnunciate", - "xEnunciate", - "SchEnunciate", - "schEnunciate", - "ScEnunciate", - "scEnunciate", - "ShEnunciate", - "shEnunciate", - "PsEnunciate", - "psEnunciate", - "ChEnunciate", - "chEnunciate", - "zzEnunciate", - "ZEnunciate", - "zEnunciate", - "ccEnunciate", - "CEnunciate", - "cEnunciate", - "ssEnunciate", - "SEnunciate", - "sEnunciate", - "sayEnunciate", - "titleEnunciate" + "enunciate" ]; diff --git a/src/js/assayJS.js b/src/js/assayJS.js index 1610d9c37ed..3149ecdccb8 100644 --- a/src/js/assayJS.js +++ b/src/js/assayJS.js @@ -621,12 +621,7 @@ globalThis.getEnunciation = function(slave) { * @param {App.Entity.SlaveState} slave */ globalThis.Enunciate = function(slave) { - const enunc = getEnunciation(slave); - - for (const e in enunc) { - V[`${e}Enunciate`] = enunc[e]; - } - + V.enunciate = getEnunciation(slave); V.writtenTitle = getWrittenTitle(slave); }; diff --git a/src/uncategorized/RESS.tw b/src/uncategorized/RESS.tw index 088fb0d0d02..fa3e61a47de 100644 --- a/src/uncategorized/RESS.tw +++ b/src/uncategorized/RESS.tw @@ -1539,7 +1539,7 @@ There is a horrible crash from the shower. You rush in to see <<= App.UI.slaveDe <<if !canTalk($activeSlave)>> $He points to $his pussy and comically pantomimes having sex, and then uses gestures to ask if $he can serve you with $his pussy. <<else>> - $He <<say>>s, "<<= capFirstChar($titleEnunciate)>>, I want to know what it'<<s>> like to have a cock in my virgin pu<<ss>>y. <<if canSee($activeSlave)>><<S>>eeing<<elseif canHear($activeSlave)>>Hearing<<else>>Learning about<</if>> <<s>>o many of the other <<s>>lave<<s>> getting fucked make<<s>> it <<if canSee($activeSlave)>>look<<elseif canHear($activeSlave)>><<s>>ound<<else>><<s>>eem<</if>> like <<s>>o much fun. I'm <<s>>o turned on by it. I can't be a proper <<s>>e<<x>> <<s>>lave without u<<s>>ing my pu<<ss>>y. Plea<<s>>e take my virginity, <<Master>>." + $He <<say>>s, "<<= capFirstChar($enunciate.title)>>, I want to know what it'<<s>> like to have a cock in my virgin pu<<ss>>y. <<if canSee($activeSlave)>><<S>>eeing<<elseif canHear($activeSlave)>>Hearing<<else>>Learning about<</if>> <<s>>o many of the other <<s>>lave<<s>> getting fucked make<<s>> it <<if canSee($activeSlave)>>look<<elseif canHear($activeSlave)>><<s>>ound<<else>><<s>>eem<</if>> like <<s>>o much fun. I'm <<s>>o turned on by it. I can't be a proper <<s>>e<<x>> <<s>>lave without u<<s>>ing my pu<<ss>>y. Plea<<s>>e take my virginity, <<Master>>." <</if>> $He spreads $his legs <<if $activeSlave.belly >= 10000>>carefully and cocks $his hips<<else>>and cocks $his hips suggestively<</if>> at you. @@ -1549,7 +1549,7 @@ $He spreads $his legs <<if $activeSlave.belly >= 10000>>carefully and cocks $his <<if !canTalk($activeSlave)>> $He comically pantomimes anal sex, and then uses gestures to ask if $he can serve you anally. <<else>> - $He <<say>>s, "<<= capFirstChar($titleEnunciate)>>, I <<if canSee($activeSlave)>><<s>>ee<<elseif canHear($activeSlave)>>hear<<else>>am <<s>>urrounded by<</if>> <<s>>o many of the other <<s>>lave<<s>> getting buttfucked. I think it'<<s>> hot <<if canSee($activeSlave)>><<s>>eeing<<elseif canHear($activeSlave)>>hearing<<else>>that you have<</if>> them take it up the a<<ss>>, and I feel almo<<s>>t incomplete <<s>>in<<c>>e I don't take cock in every hole. Plea<<s>>e take my butt virginity, <<Master>>." + $He <<say>>s, "<<= capFirstChar($enunciate.title)>>, I <<if canSee($activeSlave)>><<s>>ee<<elseif canHear($activeSlave)>>hear<<else>>am <<s>>urrounded by<</if>> <<s>>o many of the other <<s>>lave<<s>> getting buttfucked. I think it'<<s>> hot <<if canSee($activeSlave)>><<s>>eeing<<elseif canHear($activeSlave)>>hearing<<else>>that you have<</if>> them take it up the a<<ss>>, and I feel almo<<s>>t incomplete <<s>>in<<c>>e I don't take cock in every hole. Plea<<s>>e take my butt virginity, <<Master>>." <</if>> $He<<if $activeSlave.belly >= 10000>> carefully turns and spreads $his legs, allowing $his _belly <<if $activeSlave.bellyPreg >= 3000>>pregnant <</if>> belly space as $he bends over, to wiggle<<else>> turns around and wiggles<</if>> $his posterior indicatively. @@ -1910,7 +1910,7 @@ During a routine inspection of <<= App.UI.slaveDescriptionDialog($activeSlave)>> <<case "restricted profession">> -<<set _shoutitoutloud = $titleEnunciate.toUpperCase()>> +<<set _shoutitoutloud = $enunciate.title.toUpperCase()>> <<= App.UI.slaveDescriptionDialog($activeSlave)>> is <<if (!hasAnyLegs($activeSlave))>>sitting <<if (hasAnyArms($activeSlave))>>helplessly<<else>>limblessly<</if>><<elseif !canWalk($activeSlave)>>kneeling<<else>>standing<</if>> before your desk for $his regular inspection. $He is studiously observing the letter of the rule against speaking, and is doing $his best to make your inspection as efficient as possible. $His desire to please radiates off $him in almost palpable waves. $He obviously wants to communicate something to you, but can't do it without breaking the rules. diff --git a/src/utility/descriptionWidgetsPiercings.tw b/src/utility/descriptionWidgetsPiercings.tw index 75f27373d8a..94505d260dd 100644 --- a/src/utility/descriptionWidgetsPiercings.tw +++ b/src/utility/descriptionWidgetsPiercings.tw @@ -143,15 +143,15 @@ with $his fat lips; <</if>> <<run Enunciate($activeSlave)>> - <<if $writtenTitle === $titleEnunciate>> + <<if $writtenTitle === $enunciate.title>> <<if (setup.badNames.includes(capFirstChar($writtenTitle)))>> unfortunately <<else>> fortunately <</if>> - '$titleEnunciate' is easy to pronounce. + '$enunciate.title' is easy to pronounce. <<else>> - '$writtenTitle' comes out as '$titleEnunciate.' + '$writtenTitle' comes out as '$enunciate.title.' <</if>> <</if>> <</if>> diff --git a/src/utility/miscWidgets.tw b/src/utility/miscWidgets.tw index 3c0641866c2..81bd824e362 100644 --- a/src/utility/miscWidgets.tw +++ b/src/utility/miscWidgets.tw @@ -10,29 +10,29 @@ Allows for dynamic updating of the next button in the storyCaption (left side-ba <<replace "#nextButton">> <<userButton>> <</replace>> <</widget>> -<<widget "Master">><<if def $args[0]>><<run Enunciate($args[0])>><<elseif ndef $titleEnunciate>><<run Enunciate($activeSlave)>><</if>>$titleEnunciate<</widget>> -<<widget "say">><<if (def $args[0]) && $sayEnunciate != "lisp">>$args[0]<<else>>$sayEnunciate<</if>><</widget>> -<<widget "s">>$sEnunciate<</widget>> -<<widget "S">>$SEnunciate<</widget>> -<<widget "ss">>$ssEnunciate<</widget>> -<<widget "c">>$cEnunciate<</widget>> -<<widget "C">>$CEnunciate<</widget>> -<<widget "cc">>$ccEnunciate<</widget>> -<<widget "z">>$zEnunciate<</widget>> -<<widget "Z">>$ZEnunciate<</widget>> -<<widget "zz">>$zzEnunciate<</widget>> -<<widget "ch">>$chEnunciate<</widget>> -<<widget "Ch">>$ChEnunciate<</widget>> -<<widget "ps">>$psEnunciate<</widget>> -<<widget "Ps">>$PsEnunciate<</widget>> -<<widget "sh">>$shEnunciate<</widget>> -<<widget "Sh">>$ShEnunciate<</widget>> -<<widget "sc">>$scEnunciate<</widget>> -<<widget "Sc">>$ScEnunciate<</widget>> -<<widget "sch">>$schEnunciate<</widget>> -<<widget "Sch">>$SchEnunciate<</widget>> -<<widget "x">>$xEnunciate<</widget>> -<<widget "X">>$XEnunciate<</widget>> +<<widget "Master">><<if def $args[0]>><<run Enunciate($args[0])>><<elseif ndef $enunciate>><<run Enunciate($activeSlave)>><</if>>$enunciate.title<</widget>> +<<widget "say">><<if (def $args[0]) && $enunciate.say != "lisp">>$args[0]<<else>>$enunciate.say<</if>><</widget>> +<<widget "s">>$enunciate.s<</widget>> +<<widget "S">>$enunciate.S<</widget>> +<<widget "ss">>$enunciate.ss<</widget>> +<<widget "c">>$enunciate.c<</widget>> +<<widget "C">>$enunciate.C<</widget>> +<<widget "cc">>$enunciate.cc<</widget>> +<<widget "z">>$enunciate.z<</widget>> +<<widget "Z">>$enunciate.Z<</widget>> +<<widget "zz">>$enunciate.zz<</widget>> +<<widget "ch">>$enunciate.ch<</widget>> +<<widget "Ch">>$enunciate.Ch<</widget>> +<<widget "ps">>$enunciate.ps<</widget>> +<<widget "Ps">>$enunciate.Ps<</widget>> +<<widget "sh">>$enunciate.sh<</widget>> +<<widget "Sh">>$enunciate.Sh<</widget>> +<<widget "sc">>$enunciate.sc<</widget>> +<<widget "Sc">>$enunciate.Sc<</widget>> +<<widget "sch">>$enunciate.sch<</widget>> +<<widget "Sch">>$enunciate.Sch<</widget>> +<<widget "x">>$enunciate.x<</widget>> +<<widget "X">>$enunciate.X<</widget>> /* If $args[0] is defined, it is assumed the primary slave is speaking about secondary slave. Else, the secondary slave is speaking about primary slave. -- GitLab