From 8cf0e9b12e717d5929d343a9f7f4d2b697fb6a80 Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Sun, 7 Mar 2021 20:40:16 -0800 Subject: [PATCH] Trim redundant art code --- .../bodyModification/bodyModification.js | 4 +--- src/facilities/salon/salonPassage.js | 4 +--- src/gui/options/options.js | 4 +--- src/npc/descriptions/longSlave.js | 18 ++++++------------ src/uncategorized/pRivalryCapture.js | 5 +---- 5 files changed, 10 insertions(+), 25 deletions(-) diff --git a/src/facilities/bodyModification/bodyModification.js b/src/facilities/bodyModification/bodyModification.js index 0b0a7979644..e361e68c80d 100644 --- a/src/facilities/bodyModification/bodyModification.js +++ b/src/facilities/bodyModification/bodyModification.js @@ -25,9 +25,7 @@ App.UI.bodyModification = function(slave, cheat = false) { function createPage() { const el = new DocumentFragment(); if (!cheat) { - if (V.seeImages > 0) { - App.Events.drawEventArt(el, slave); - } + App.Events.drawEventArt(el, slave); el.append(intro()); el.append(reaction()); } diff --git a/src/facilities/salon/salonPassage.js b/src/facilities/salon/salonPassage.js index 9ebdc3ac4c4..8a9b7543af1 100644 --- a/src/facilities/salon/salonPassage.js +++ b/src/facilities/salon/salonPassage.js @@ -18,9 +18,7 @@ App.UI.salon = function(slave, cheat = false) { function createPage() { const el = new DocumentFragment(); if (!cheat) { - if (V.seeImages > 0) { - App.Events.drawEventArt(el, slave); - } + App.Events.drawEventArt(el, slave); el.append(intro()); } el.append(eyewear()); diff --git a/src/gui/options/options.js b/src/gui/options/options.js index 2c2934f6f84..2ba22b920de 100644 --- a/src/gui/options/options.js +++ b/src/gui/options/options.js @@ -1028,9 +1028,7 @@ App.UI.artOptions = function() { const el = new DocumentFragment(); let options = new App.UI.OptionsGroup(); - if (V.seeImages > 0) { - App.Events.drawEventArt(el, BaseSlave()); - } + App.Events.drawEventArt(el, BaseSlave()); options.addOption("Images are", "seeImages") .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); diff --git a/src/npc/descriptions/longSlave.js b/src/npc/descriptions/longSlave.js index b60dcc1ff1e..939e00b9b7a 100644 --- a/src/npc/descriptions/longSlave.js +++ b/src/npc/descriptions/longSlave.js @@ -15,23 +15,17 @@ App.Desc.longSlave = function(slave, {market = 0, eventDescription = false, pris const applyLaw = applyLawCheck(market); SlaveStatClamp(slave); - if (V.seeImages === 1 && !eventDescription && !noArt) { - // Art - span = document.createElement('span'); - span.id = "art-frame"; - App.Events.drawEventArt(span, slave); - el.appendChild(span); + if (!eventDescription && !noArt) { + App.Events.drawEventArt(el, slave); } p = document.createElement("p"); // Name - p.appendChild( - App.UI.DOM.makeElement( - "span", - `${SlaveFullName(slave)} `, - ["slave", "name", "simple"] - ) + App.UI.DOM.appendNewElement( + "span", p, + `${SlaveFullName(slave)} `, + ["slave", "name", "simple"] ); // Label diff --git a/src/uncategorized/pRivalryCapture.js b/src/uncategorized/pRivalryCapture.js index 9a766ec878c..c38cf146ab3 100644 --- a/src/uncategorized/pRivalryCapture.js +++ b/src/uncategorized/pRivalryCapture.js @@ -8,10 +8,7 @@ globalThis.pRivalryCapture = function() { V.rivalRace = 0; V.rivalGender = 0; - const artDiv = document.createElement("span"); - artDiv.id = "art-frame"; - App.Events.drawEventArt(artDiv, slave); - el.append(artDiv); + App.Events.drawEventArt(el, slave); r.push(`Your`); if (passage() === "P rivalry actions") { -- GitLab