From 3be14dfef0d4b86e7c21b25e77118abe7f0fd979 Mon Sep 17 00:00:00 2001 From: Arkerthan <arkerthan@gmail.com> Date: Thu, 14 Jan 2021 21:09:18 +0100 Subject: [PATCH] Make prosthetic config look more similar to other slave config passages --- src/interaction/prostheticConfig.js | 48 +++++++++++------------------ 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/src/interaction/prostheticConfig.js b/src/interaction/prostheticConfig.js index 91fc869e063..01c07dcecca 100644 --- a/src/interaction/prostheticConfig.js +++ b/src/interaction/prostheticConfig.js @@ -45,12 +45,11 @@ App.UI.prostheticsConfig = function(slave) { if (hasAnyCyberneticEyes(slave)) { App.UI.DOM.appendNewElement("h2", f, "Eyes"); const p = document.createElement("p"); - p.classList.add("choices"); p.append(`${He} has ${hasBothCyberneticEyes(slave) ? "ocular implants" : "an ocular implant"} installed. You can change ${hasBothCyberneticEyes(slave) ? "their" : "its"} settings:`); const eyeContainer = document.createElement("div"); - eyeContainer.classList.add("eyeContainer"); + eyeContainer.classList.add("eyeContainer", "choices"); let _on = 0, _blur = 0, _off = 0; if (getLeftEyeType(slave) === 3) { @@ -136,9 +135,9 @@ App.UI.prostheticsConfig = function(slave) { } p.append(eyeContainer); - const colorP = document.createElement("p"); - colorP.append(`${He} has ${App.Desc.eyesColor(slave)}. To change ${his} eye color visit the `, App.UI.DOM.passageLink("auto salon", "Salon"), "."); - p.append(colorP); + const colorDiv = document.createElement("div"); + colorDiv.append(`${He} has ${App.Desc.eyesColor(slave)}. To change ${his} eye color visit the `, App.UI.DOM.passageLink("auto salon", "Salon"), "."); + p.append(colorDiv); f.append(p); } @@ -151,7 +150,6 @@ App.UI.prostheticsConfig = function(slave) { App.UI.DOM.appendNewElement("h2", f, "Ears"); const p = document.createElement("p"); - p.classList.add("indent"); p.append(`${He} has cochlear implants installed.`); if (slave.hears === 0) { p.append("They are operating normally."); @@ -160,7 +158,6 @@ App.UI.prostheticsConfig = function(slave) { } else { p.append("They are turned off."); } - f.append(p); const links = []; if (slave.hears !== 0) { @@ -181,7 +178,9 @@ App.UI.prostheticsConfig = function(slave) { V.prostheticsConfig = "hearing"; })); } - App.UI.DOM.appendNewElement("p", f, linkStrip(links), "indent"); + App.UI.DOM.appendNewElement("div", p, linkStrip(links), "choices"); + + f.append(p); } return f; } @@ -192,7 +191,6 @@ App.UI.prostheticsConfig = function(slave) { if (slave.electrolarynx === 1) { App.UI.DOM.appendNewElement("h2", f, "Voice"); const p = document.createElement("p"); - p.classList.add("indent"); p.append(`${He} has an electrolarynx installed.`); if (slave.voice === 0) { p.append("It is turned off."); @@ -203,7 +201,6 @@ App.UI.prostheticsConfig = function(slave) { } else if (slave.voice === 3) { p.append(`It is set to its "high voice" setting.`); } - f.append(p); const links = []; if (slave.voice !== 0) { @@ -230,7 +227,9 @@ App.UI.prostheticsConfig = function(slave) { V.prostheticsConfig = "voice"; })); } - App.UI.DOM.appendNewElement("p", f, linkStrip(links)); + App.UI.DOM.appendNewElement("div", p, linkStrip(links), "choices"); + + f.append(p); } return f; } @@ -239,7 +238,7 @@ App.UI.prostheticsConfig = function(slave) { const f = document.createDocumentFragment(); App.UI.DOM.appendNewElement("h2", f, "Limbs"); - App.UI.DOM.appendNewElement("p", f, App.Medicine.Prosthetics.selector(slave, App.Medicine.Prosthetics.currentLimbs(slave)), "choices"); + App.UI.DOM.appendNewElement("p", f, App.Medicine.Prosthetics.selector(slave, App.Medicine.Prosthetics.currentLimbs(slave))); return f; } @@ -249,21 +248,18 @@ App.UI.prostheticsConfig = function(slave) { App.UI.DOM.appendNewElement("h2", f, "Tail"); const p = document.createElement("p"); - p.classList.add("indent"); if (slave.PTail === 1) { App.UI.DOM.appendNewElement("div", p, `${He} has a neural tail interface installed. You can assign and adjust ${his} tail here.`); - const div = document.createElement("div"); - div.classList.add("double-indent"); - if (slave.tail !== "none") { - div.append(`${He} currently has a tail attached, if you wish to change it you first need to detach it. `, + App.UI.DOM.appendNewElement("div", p, `${He} currently has a tail attached, if you wish to change it you first need to detach it.`); + App.UI.DOM.appendNewElement("div", p, App.UI.DOM.passageLink("Detach", "Prosthetics Configuration", () => { V.prostheticsConfig = "detachTail"; V.nextButton = "Continue"; V.nextLink = "Prosthetics Configuration"; - })); + }), "choices"); } else { if (isProstheticAvailable(slave, "modT")) { App.UI.DOM.appendNewElement("div", p, "Attach a modular tail designed to look like a:"); @@ -279,7 +275,7 @@ App.UI.prostheticsConfig = function(slave) { } )); }); - App.UI.DOM.appendNewElement("div", div, linkStrip(links)); + App.UI.DOM.appendNewElement("div", p, linkStrip(links), "choices"); } const links = []; if (isProstheticAvailable(slave, "combatT")) { @@ -296,17 +292,12 @@ App.UI.prostheticsConfig = function(slave) { slave.tailColor = "pink"; })); } - App.UI.DOM.appendNewElement("div", div, linkStrip(links)); + App.UI.DOM.appendNewElement("div", p, linkStrip(links), "choices"); } - p.append(div); if (slave.tail === "mod") { App.UI.DOM.appendNewElement("div", p, - `${He} currently has a modular tail, styled to look like ${App.Data.modTails.get(slave.tailShape).desc}.`); - - const div = document.createElement("div"); - div.classList.add("double-indent"); - div.append(`Modify ${his} tail's appearance:`); + `${He} currently has a modular tail, styled to look like ${App.Data.modTails.get(slave.tailShape).desc}. Modify ${his} tail's appearance:`); const links = []; App.Data.modTails.forEach((value, key) => { @@ -315,8 +306,7 @@ App.UI.prostheticsConfig = function(slave) { cashX(forceNeg(V.modCost), "slaveMod", slave); })); }); - App.UI.DOM.appendNewElement("div", div, linkStrip(links)); - p.append(div); + App.UI.DOM.appendNewElement("div", p, linkStrip(links), "choices"); } } else { App.UI.DOM.appendNewElement("span", p, `${He} does not have a neural tail interface installed so you cannot attach a tail.`, "note"); @@ -330,8 +320,6 @@ App.UI.prostheticsConfig = function(slave) { App.UI.DOM.appendNewElement("h2", f, "Prosthetics"); const p = document.createElement("p"); - p.classList.add("choices"); - App.UI.DOM.appendNewElement("span", p, `Fit prosthetics to ${him}:`, "note"); const gridDiv = document.createElement("div"); -- GitLab