From 9bc729676b76c39e5afc4f71393c39c971bd7cd9 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Mon, 27 Jul 2020 00:41:51 -0400 Subject: [PATCH] fixes esp for art --- src/js/salon.js | 12 +++++++++--- src/uncategorized/salon.tw | 14 ++++++++------ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/js/salon.js b/src/js/salon.js index 93044b119b5..5892475b4a2 100644 --- a/src/js/salon.js +++ b/src/js/salon.js @@ -245,6 +245,7 @@ App.Medicine.Salon.ears = function(slave, {primaryEarColor = 0, secondaryEarColo "Match current hair", () => { slave.earTColor = slave.hColor; + App.Art.refreshSlaveArt(slave, 3, "artFrame"); apply(); } ) @@ -276,6 +277,7 @@ App.Medicine.Salon.ears = function(slave, {primaryEarColor = 0, secondaryEarColo `Color ${his} ears`, () => { slave.earTColor = (primaryEarColor + secondaryEarColor); + App.Art.refreshSlaveArt(slave, 3, "artFrame"); cashX(forceNeg(V.modCost), "slaveMod", slave); App.Medicine.Salon.ears(slave); // discard selections after locking them in. } @@ -301,6 +303,7 @@ App.Medicine.Salon.ears = function(slave, {primaryEarColor = 0, secondaryEarColo return App.UI.DOM.generateLinksStrip(links); } function apply() { + App.Art.refreshSlaveArt(slave, 3, "artFrame"); App.Medicine.Salon.ears( slave, { @@ -321,8 +324,8 @@ App.Medicine.Salon.ears = function(slave, {primaryEarColor = 0, secondaryEarColo */ App.Medicine.Salon.hair = function(slave, {primaryHairColor = 0, secondaryHairColor = ""} = {}) { const frag = new DocumentFragment(); - let updatePrimary = (newVal) => { primaryHairColor = newVal; apply(); }; - let updateSecondary = (newVal) => { secondaryHairColor = newVal; apply(); }; + let updatePrimary = (newVal) => { primaryHairColor = newVal.value; apply(); }; + let updateSecondary = (newVal) => { secondaryHairColor = newVal.value; apply(); }; const {His, his, He, him} = getPronouns(slave); if (slave.bald !== 1) { @@ -386,7 +389,8 @@ App.Medicine.Salon.hair = function(slave, {primaryHairColor = 0, secondaryHairCo App.UI.DOM.link( `Color ${his} hair`, () => { - slave.earTColor = (primaryHairColor + secondaryHairColor); + slave.hColor = (primaryHairColor + secondaryHairColor); + App.Art.refreshSlaveArt(slave, 3, "artFrame"); cashX(forceNeg(V.modCost), "slaveMod", slave); App.Medicine.Salon.hair(slave); // discard selections after locking them in. } @@ -556,6 +560,7 @@ App.Medicine.Salon.hair = function(slave, {primaryHairColor = 0, secondaryHairCo `Change`, () => { slave.earTColor = (primaryHairColor + secondaryHairColor); + App.Art.refreshSlaveArt(slave, 3, "artFrame"); cashX(forceNeg(V.modCost), "slaveMod", slave); App.Medicine.Salon.hair(slave); // discard selections after locking them in. } @@ -665,6 +670,7 @@ App.Medicine.Salon.hair = function(slave, {primaryHairColor = 0, secondaryHairCo } function apply() { + App.Art.refreshSlaveArt(slave, 3, "artFrame"); App.Medicine.Salon.hair( slave, { diff --git a/src/uncategorized/salon.tw b/src/uncategorized/salon.tw index 4e5050aaf43..8f92721d544 100644 --- a/src/uncategorized/salon.tw +++ b/src/uncategorized/salon.tw @@ -17,13 +17,15 @@ </span> /* 000-250-006 */ -<<if $seeImages == 1>> - <<if $imageChoice == 1>> - <div class="imageRef lrgVector"><div class="mask"> </div><<= SlaveArt(getSlave($AS), 3, 0)>></div> - <<else>> - <div class="imageRef lrgRender"><div class="mask"> </div><<= SlaveArt(getSlave($AS), 3, 0)>></div> +<span id="artFrame"> + <<if $seeImages == 1>> + <<if $imageChoice == 1>> + <div class="imageRef lrgVector"><div class="mask"> </div><<= SlaveArt(getSlave($AS), 3, 0)>></div> + <<else>> + <div class="imageRef lrgRender"><div class="mask"> </div><<= SlaveArt(getSlave($AS), 3, 0)>></div> + <</if>> <</if>> -<</if>> +</span> /* 000-250-006 */ /* EYES */ -- GitLab