From fe01fb16dd4afe2992f0b319ca89a1fd34772f82 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Thu, 7 Jan 2021 17:34:59 -0500 Subject: [PATCH] more conversion --- src/facilities/surgery/surgeryPassageUpper.js | 69 ++++++------------- 1 file changed, 20 insertions(+), 49 deletions(-) diff --git a/src/facilities/surgery/surgeryPassageUpper.js b/src/facilities/surgery/surgeryPassageUpper.js index 793038d5038..c5ead7633f9 100644 --- a/src/facilities/surgery/surgeryPassageUpper.js +++ b/src/facilities/surgery/surgeryPassageUpper.js @@ -29,13 +29,9 @@ App.UI.surgeryPassageUpper = function(slave, cheat = false) { // <div> r.push(`${His}`); if (slave.boobs < 300) { - either("androgynous", "flat"); - r.push(` chest is barely there.`); + r.push(`${either("androgynous", "flat")} chest is barely there.`); } else if (slave.boobs < 400) { - either("pointy", "tiny"); - r.push(`, `); - slave.boobs; - r.push(`cc chest only fill A-cups.`); + r.push(`${either("pointy", "tiny")}, ${slave.boobs}cc chest only fill A-cups.`); } else if (slave.boobs < 8500) { if (V.showBoobCCs === 1) { r.push(App.Desc.boobBits.format("%ADJ %NOUN, %VOLUME CCs, would fill %ACUP.", slave.boobs)); @@ -44,7 +40,7 @@ App.UI.surgeryPassageUpper = function(slave, cheat = false) { } } else { r.push(App.Desc.boobBits.format("%ADJ %NOUN, %VOLUME CCs, ", slave.boobs)); - r.push(` fill out an enormous custom bra; ${his} tits dominate ${his} entire frame.`); + r.push(`fill out an enormous custom bra; ${his} tits dominate ${his} entire frame.`); } // </div> @@ -81,35 +77,20 @@ App.UI.surgeryPassageUpper = function(slave, cheat = false) { r.push(`giant,`); } } - r.push(`${slave.boobsImplant}`); - r.push(`cc `); - slave.boobsImplantType; - r.push(` breast implants.`); + r.push(`${slave.boobsImplant}cc ${slave.boobsImplantType} breast implants.`); } else if (slave.boobsImplantType !== "none") { if (slave.boobsImplant > 1000) { - r.push(`massive, `); - slave.boobsImplant; - r.push(`cc`); + r.push(`massive, ${slave.boobsImplant}cc`); } else if (slave.boobsImplant > 800) { - r.push(`giant, `); - slave.boobsImplant; - r.push(`cc`); + r.push(`giant, ${slave.boobsImplant}cc`); } else if (slave.boobsImplant > 600) { - r.push(`huge, `); - slave.boobsImplant; - r.push(`cc`); + r.push(`huge, ${slave.boobsImplant}cc`); } else if (slave.boobsImplant > 400) { - r.push(`large, `); - slave.boobsImplant; - r.push(`cc`); + r.push(`large, ${slave.boobsImplant}cc`); } else if (slave.boobsImplant > 200) { - r.push(`moderate, `); - slave.boobsImplant; - r.push(`cc`); + r.push(`moderate, ${slave.boobsImplant}cc`); } else if (slave.boobsImplant > 0) { - r.push(`small, `); - slave.boobsImplant; - r.push(`cc`); + r.push(`small, ${slave.boobsImplant}cc`); } if (slave.boobsImplantType !== "normal") { r.push(`${slave.boobsImplantType}`); @@ -121,12 +102,10 @@ App.UI.surgeryPassageUpper = function(slave, cheat = false) { } else { r.push(`no implants.`); } - // <div class="choices"> + App.Events.addNode(el, r, "div"); const _surgeries = App.Medicine.Surgery.sizingProcedures.boobs(slave, App.Medicine.Surgery.allSizingOptions()); const _surgeryLinks = _surgeries.map(s => App.Medicine.Surgery.makeLink("Surgery Degradation", s, slave)); - r.push(App.UI.DOM.generateLinksStrip(_surgeryLinks)); - // </div> - // </div> + App.UI.DOM.appendNewElement("div", el, (App.UI.DOM.generateLinksStrip(_surgeryLinks)), "choices"); // <div> if (slave.boobsImplant !== 0) { @@ -162,7 +141,7 @@ App.UI.surgeryPassageUpper = function(slave, cheat = false) { } else { if (slave.boobShape === "saggy" || slave.boobShape === "downward-facing") { // [[Breast lift|Surgery Degradation][slave.boobShape = "normal", surgeryDamage(slave,20),cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave), V.surgeryType = "breastLift"]] - if (slave.preg > slave.pregData.normalBirth/1.42 || (slave.boobs >= 5000 && slave.boobs < 8000)) { + if (slave.preg > slave.pregData.normalBirth / 1.42 || (slave.boobs >= 5000 && slave.boobs < 8000)) { r.push(` <span class="note">${His} current state may result in ${his} breasts becoming saggy again</span>`); } } else { @@ -195,9 +174,9 @@ App.UI.surgeryPassageUpper = function(slave, cheat = false) { if (slave.nipples === "fuckable") { // [[Restore their shape and function|Surgery Degradation][slave.nipples = "huge",cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave), surgeryDamage(slave,10),V.surgeryType = "areolae"]] } else { - if (slave.boobs-slave.boobsMilk < 500) { + if (slave.boobs - slave.boobsMilk < 500) { r.push(`<span class="note">${His} breasts are too small to support reshaping ${his} nipples to be penetratable</span>`); - } else if (slave.boobs-slave.boobsImplant-slave.boobsMilk < 500) { + } else if (slave.boobs - slave.boobsImplant - slave.boobsMilk < 500) { r.push(`<span class="note">${His} implants are too large to support reshaping ${his} nipples to be penetratable</span>`); } else if (slave.nipples !== "huge") { r.push(`<span class="note">${His} nipples are too small to be made fuckable</span>`); @@ -238,11 +217,7 @@ App.UI.surgeryPassageUpper = function(slave, cheat = false) { } else if (slave.areolae === 4) { r.push(`massive`); } - r.push(`areolae`); - if (slave.areolaeShape !== "circle") { - r.push(`, which have been surgically altered to be ${slave.areolaeShape}-shaped`); - } - r.push(`.`); + r.push(`areolae${(slave.areolaeShape !== "circle") ? `, which have been surgically altered to be ${slave.areolaeShape}-shaped`:``}.`); } if (slave.indentureRestrictions < 2) { if (slave.areolaeShape !== "circle") { @@ -364,7 +339,7 @@ App.UI.surgeryPassageUpper = function(slave, cheat = false) { slave.pregKnown = 1; } else if (slave.bellyImplant > 0) { r.push(`got a ${slave.bellyImplant}cc implant filled implant located in ${his} abdomen.`); - if (slave.cervixImplant === 1 ) { + if (slave.cervixImplant === 1) { r.push(`${He} also has micropump filter installed in ${his} cervix feeding into the implant.`); } else if (slave.cervixImplant === 2) { r.push(`${He} also has micropump filter installed in ${his} rectum feeding into the implant.`); @@ -374,7 +349,7 @@ App.UI.surgeryPassageUpper = function(slave, cheat = false) { } else if (slave.bellyFluid >= 1500) { r.push(`got a ${slave.inflationType}-filled implant located in ${his} abdomen.`); - if (slave.cervixImplant === 1 ) { + if (slave.cervixImplant === 1) { r.push(`${He} also has micropump filter installed in ${his} cervix feeding into the implant.`); } else if (slave.cervixImplant === 2) { r.push(`${He} also has micropump filter installed in ${his} rectum feeding into the implant.`); @@ -383,7 +358,7 @@ App.UI.surgeryPassageUpper = function(slave, cheat = false) { } } else if (slave.bellyImplant === 0) { r.push(`got an empty fillable implant located in ${his} abdomen.`); - if (slave.cervixImplant === 1 ) { + if (slave.cervixImplant === 1) { r.push(`${He} also has micropump filter installed in ${his} cervix feeding into the implant.`); } else if (slave.cervixImplant === 2) { r.push(`${He} also has micropump filter installed in ${his} rectum feeding into the implant.`); @@ -454,11 +429,7 @@ App.UI.surgeryPassageUpper = function(slave, cheat = false) { /* Uterine Implants */ // <div> if (slave.wombImplant === "none" && (V.UterineRestraintMesh === 1) && (slave.ovaries === 1 || slave.mpreg === 1)) { - r.push(`${He} has a normal uterus`); - if (slave.mpreg === 1) { - r.push(`, though slightly repositioned`); - } - r.push(`.`); + r.push(`${He} has a normal uterus${(slave.mpreg === 1) ? `, though slightly repositioned` : ``}.`); if (slave.indentureRestrictions >= 1) { r.push(`<span class="note">${His} indenture forbids invasive elective surgery</span>`); } else if (slave.bellyImplant > 0 || slave.preg > 0) { -- GitLab