From 24f18fca75cad5b8f66b56b5976c2d2e69aea583 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Sun, 17 Jan 2021 18:20:15 -0500 Subject: [PATCH] rearrange layout of abortion and birth tats --- .../bodyModification/bodyModification.js | 169 +++++++++--------- 1 file changed, 87 insertions(+), 82 deletions(-) diff --git a/src/facilities/bodyModification/bodyModification.js b/src/facilities/bodyModification/bodyModification.js index 2598ed7939d..00cd7c2d5c2 100644 --- a/src/facilities/bodyModification/bodyModification.js +++ b/src/facilities/bodyModification/bodyModification.js @@ -577,125 +577,130 @@ App.UI.bodyModification = function(slave, cheat = false) { r = []; linkArray = []; - if (slave.birthsTat > 0) { - if (slave.birthsTat > 1) { - r.push(`${He} has a series of ${num(slave.birthsTat)} baby-shaped tattoos adorning ${his} stomach; one for each successful`); - if (slave.pregKnown === 1) { - r.push(`pregnancy and a temporary one for ${his} current pregnancy.`); - } else { - r.push(`pregnancy.`); - } - } else { - r.push(`${He} has a single baby-shaped tattoo${(slave.pregKnown === 1) ? `, and one temporary one,` : ``} adorning ${his} stomach.`); - } - linkArray.push( + if (slave.birthsTat === -1) { + r.push(`Have ${him} receive a tattoo each time ${he} gives birth.`); + r.push( App.UI.DOM.link( - "Remove tattoos", + "Begin keeping track", () => { - slave.birthsTat = -1; - billMod(); + slave.birthsTat = 0; refresh(); } ) ); - } else if (slave.birthsTat === 0) { - if (slave.pregKnown === 1) { - r.push(`${He} has a single baby-shaped temporary tattoo adorning ${his} stomach.`); - r.push( - App.UI.DOM.link( - "Remove it", - () => { - slave.birthsTat = -1; - refresh(); - } - ) - ); - if (slave.abortionTat > -1) { - r.push(App.UI.DOM.makeElement("span", `This will only remove birth tracking`, "note")); + } else { + if (slave.birthsTat > 0) { + if (slave.birthsTat > 1) { + r.push(`${He} has a series of ${num(slave.birthsTat)} baby-shaped tattoos adorning ${his} stomach; one for each successful`); + if (slave.pregKnown === 1) { + r.push(`pregnancy and a temporary one for ${his} current pregnancy.`); + } else { + r.push(`pregnancy.`); + } + } else { + r.push(`${He} has a single baby-shaped tattoo${(slave.pregKnown === 1) ? `, and one temporary one,` : ``} adorning ${his} stomach.`); } - } else { - r.push(`${He} is scheduled to receive a tattoo each time ${he} gives birth.`); - r.push( + linkArray.push( App.UI.DOM.link( - "Cancel", + "Remove tattoos", () => { slave.birthsTat = -1; + billMod(); refresh(); } ) ); - } - } else { - r.push(`Have ${him} receive a tattoo each time ${he} gives birth.`); - r.push( - App.UI.DOM.link( - "Begin keeping track", - () => { - slave.birthsTat = 0; - refresh(); + } else if (slave.birthsTat === 0) { + if (slave.pregKnown === 1) { + r.push(`${He} has a single baby-shaped temporary tattoo adorning ${his} stomach.`); + r.push( + App.UI.DOM.link( + "Remove it", + () => { + slave.birthsTat = -1; + refresh(); + } + ) + ); + if (slave.abortionTat > -1) { + r.push(App.UI.DOM.makeElement("span", `This will only remove birth tracking`, "note")); } - ) - ); + } else { + r.push(`${He} is scheduled to receive a tattoo each time ${he} gives birth.`); + r.push( + App.UI.DOM.link( + "Cancel", + () => { + slave.birthsTat = -1; + refresh(); + } + ) + ); + } + } } + App.Events.addNode(el, r, "div"); r = []; - - if (slave.abortionTat > 0) { - if (slave.abortionTat > 1) { - r.push(`${He} has a series of ${num(slave.abortionTat)} crossed out baby-shaped tattoos${(slave.pregKnown === 1) ? `, and one uncrossed one,` : ``} adorning ${his} stomach.`); - } else { - r.push(`${He} has a single crossed out baby-shaped tattoo${(slave.pregKnown === 1) ? `, and one uncrossed one,` : ``} adorning ${his} stomach.`); - } + if (slave.abortionTat === -1) { + r.push(`Have ${him} receive a tattoo for each abortion or miscarriage ${he} has.`); r.push( App.UI.DOM.link( - "Remove tattoos", + "Begin keeping track", () => { - slave.abortionTat = -1; - billMod(); + slave.abortionTat = 0; refresh(); } ) ); - } else if (slave.abortionTat === 0) { - if (slave.pregKnown === 1) { - r.push(`${He} has a single baby-shaped temporary tattoo adorning ${his} stomach.`); - r.push( - App.UI.DOM.link( - "Remove it", - () => { - slave.abortionTat = -1; - refresh(); - } - ) - ); - if (slave.birthsTat > -1) { - r.push(App.UI.DOM.makeElement("span", `This will only remove abortion tracking`, "note")); + } else { + if (slave.abortionTat > 0) { + if (slave.abortionTat > 1) { + r.push(`${He} has a series of ${num(slave.abortionTat)} crossed out baby-shaped tattoos${(slave.pregKnown === 1) ? `, and one uncrossed one,` : ``} adorning ${his} stomach.`); + } else { + r.push(`${He} has a single crossed out baby-shaped tattoo${(slave.pregKnown === 1) ? `, and one uncrossed one,` : ``} adorning ${his} stomach.`); } - } else { - r.push(`${He} is scheduled to receive a tattoo each time ${he} gets an abortion or miscarries.`); r.push( App.UI.DOM.link( - "Cancel", + "Remove tattoos", () => { slave.abortionTat = -1; + billMod(); refresh(); } ) ); - } - } else { - r.push(`Have ${him} receive a tattoo for each abortion or miscarriage ${he} has.`); - r.push( - App.UI.DOM.link( - "Begin keeping track", - () => { - slave.abortionTat = 0; - refresh(); + } else if (slave.abortionTat === 0) { + if (slave.pregKnown === 1) { + r.push(`${He} has a single baby-shaped temporary tattoo adorning ${his} stomach.`); + r.push( + App.UI.DOM.link( + "Remove it", + () => { + slave.abortionTat = -1; + refresh(); + } + ) + ); + if (slave.birthsTat > -1) { + r.push(App.UI.DOM.makeElement("span", `This will only remove abortion tracking`, "note")); } - ) - ); + } else { + r.push(`${He} is scheduled to receive a tattoo each time ${he} gets an abortion or miscarries.`); + r.push( + App.UI.DOM.link( + "Cancel", + () => { + slave.abortionTat = -1; + refresh(); + } + ) + ); + } + } } + App.Events.addNode(el, r, "div"); return el; } -- GitLab