From e77a6cd15486e5e0b4b2f979dfc80196b7acebac Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Fri, 21 Feb 2020 16:56:54 -0500 Subject: [PATCH] beautify --- src/js/itemAvailability.js | 169 ++++++++++++++++++++----------------- 1 file changed, 91 insertions(+), 78 deletions(-) diff --git a/src/js/itemAvailability.js b/src/js/itemAvailability.js index 546d16e0f1b..bffc9118903 100644 --- a/src/js/itemAvailability.js +++ b/src/js/itemAvailability.js @@ -330,7 +330,7 @@ window.isClothingAccessible = (function() { }); } if (eitherCheck === 0) { - fail= true; + fail = true; } } else { if (V[requirement] !== item.rs[requirement]) { @@ -365,50 +365,55 @@ window.isClothingAccessible = (function() { break; case "bellyAccessory": { switch (item.value) { - case "a support band": + case "a support band": { if (slave.belly > 10000) { return true; } else { return `Slave belly too small for this`; } - case "a small empathy belly": - case "a medium empathy belly": - case "a large empathy belly": - case "a huge empathy belly": - if (slave.belly < 1500 && slave.weight < 130) { - return true; - } else { - return `Slave belly too big for this`; - } - default: - return true; + } + case "a small empathy belly": + case "a medium empathy belly": + case "a large empathy belly": + case "a huge empathy belly": { + if (slave.belly < 1500 && slave.weight < 130) { + return true; + } else { + return `Slave belly too big for this`; + } + } + default: + return true; } } case "buttplug": { switch (item.value) { - case "huge plug": + case "huge plug": { if (slave.anus < 2) { return `Slave's anus is too small for this right now`; } else { return true; } - case "long plug": - case "long, large plug": - if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) { - return "Elites frown on this"; - } else { - return true; - } - case "long, huge plug": - if (slave.anus < 2) { - return `Slave's anus is too small for this right now`; - } else if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) { - return "Elites frown on this"; - } else { - return true; - } - default: - return true; + } + case "long plug": + case "long, large plug": { + if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) { + return "Elites frown on this"; + } else { + return true; + } + } + case "long, huge plug": { + if (slave.anus < 2) { + return `Slave's anus is too small for this right now`; + } else if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) { + return "Elites frown on this"; + } else { + return true; + } + } + default: + return true; } } case "buttplugAttachment": @@ -418,29 +423,32 @@ window.isClothingAccessible = (function() { return false; } switch (item.value) { - case "huge dildo": + case "huge dildo": { if (slave.vagina < 2) { return `Slave's vagina is too small for this right now`; } else { return true; } - case "long dildo": - case "long, large dildo": - if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) { - return "Elites frown on this"; - } else { - return true; - } - case "long, huge dildo": - if (slave.vagina < 2) { - return `Slave's vagina is too small for this right now`; - } else if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) { - return "Elites frown on this"; - } else { - return true; - } - default: - return true; + } + case "long dildo": + case "long, large dildo": { + if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) { + return "Elites frown on this"; + } else { + return true; + } + } + case "long, huge dildo": { + if (slave.vagina < 2) { + return `Slave's vagina is too small for this right now`; + } else if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) { + return "Elites frown on this"; + } else { + return true; + } + } + default: + return true; } } case "vaginalAttachment": { @@ -469,40 +477,45 @@ window.isClothingAccessible = (function() { case "chastity": { switch (item.value) { case "chastity belt": - case "combined chastity belt": + case "combined chastity belt": { if (slave.vagina > -1) { return true; } else { return false; } - case "chastity cage": - case "combined chastity cage": - if (slave.dick > 0) { - return true; - } else { - return false; - } - case "genital chastity": - case "full chastity": - if (slave.vagina > -1 && slave.dick > 0) { - return true; - } else { - return false; - } - case "choose own chastity": - if (slave.choosesOwnChastity !== 1) { - return true; - } else { - return false; - } - case "revoke choosing own chastity": - if (slave.choosesOwnChastity > 0) { - return true; - } else { - return false; - } - default: - return true; + } + case "chastity cage": + case "combined chastity cage": { + if (slave.dick > 0) { + return true; + } else { + return false; + } + } + case "genital chastity": + case "full chastity": { + if (slave.vagina > -1 && slave.dick > 0) { + return true; + } else { + return false; + } + } + case "choose own chastity": { + if (slave.choosesOwnChastity !== 1) { + return true; + } else { + return false; + } + } + case "revoke choosing own chastity": { + if (slave.choosesOwnChastity > 0) { + return true; + } else { + return false; + } + } + default: + return true; } } default: -- GitLab