diff --git a/devNotes/Useful JS Function Documentation.txt b/devNotes/Useful JS Function Documentation.txt index a5d9dba0246a4f70b1657edb3863e59348feaf19..7982ad975547bebdd12e35fd1b0107dfe2b541c8 100644 --- a/devNotes/Useful JS Function Documentation.txt +++ b/devNotes/Useful JS Function Documentation.txt @@ -257,6 +257,12 @@ SkillIncrease.Whore(slave, value) SkillIncrease.Entertain(slave, value) - Increases the slave's skill by value or 1. Returns a string if the skill is boosted over a threshold. +surgeryAmp(slave, part) - Clean up variables connected to a specific body part that was amputated. For limbs see below. + +removeLimbs(slave, limb) - Remove limb(s) and clean up connected variables. +attachLimbs(slave, limb, id) - Attach limb(s). Expects amputated limbs, will overwrite existing. +- limb can be: "left arm", "right arm", "left leg", "right leg", "all" + UtilJS [script] Height.mean(nationality, race, genes, age) - returns the mean height for the given combination and age in years (>=2). Height.mean(nationality, race, genes) - returns the mean adult height for the given combination. @@ -376,4 +382,4 @@ UtilJS [script] jsNdef - A .js port of sugarcube's ndef. - jsDef - A .js port of sugarcube's def. \ No newline at end of file + jsDef - A .js port of sugarcube's def. diff --git a/src/js/descriptionWidgets.js b/src/js/descriptionWidgets.js index 0cbaf2e237d4f6d343583a46ddf567e247c71370..a4adfbb7fbe362029062e536477586bbc1347098 100644 --- a/src/js/descriptionWidgets.js +++ b/src/js/descriptionWidgets.js @@ -1024,21 +1024,21 @@ App.Desc.limbs = function(slave) { } else if (getLeftArmID(slave) === getRightArmID(slave) && getLeftArmID(slave) === getLeftLegID(slave) && getLeftArmID(slave) === getRightLegID(slave)) { - r += `${He} has ` + idToDescription(getLeftArmID(slave)) + ` limbs`; + r += `${He} has ${idToDescription(getLeftArmID(slave))} limbs`; } else { if (!hasAnyArms(slave)) { r += `Both of ${his} arms have been amputated`; } else if (!hasBothArms(slave)) { if (hasLeftArm(slave)) { - r += `${He} has ` + addA(idToDescription(getLeftArmID(slave))) + ` left arm, but ${his} right has been amputated,`; + r += `${He} has ${addA(idToDescription(getLeftArmID(slave)))} left arm, but ${his} right has been amputated,`; } else { - r += `${He} has ` + addA(idToDescription(getRightArmID(slave))) + ` right arm, but ${his} left has been amputated,`; + r += `${He} has ${addA(idToDescription(getRightArmID(slave)))} right arm, but ${his} left has been amputated,`; } } else { if (getLeftArmID(slave) === getRightArmID(slave)) { - r += `${He} has ` + idToDescription(getLeftArmID(slave)) + ` arms`; + r += `${He} has ${idToDescription(getLeftArmID(slave))} arms`; } else { - r += `${His} has ` + addA(idToDescription(getRightArmID(slave))) + ` right arm, but ` + addA(idToDescription(getLeftArmID(slave))) + ` left arm`; + r += `${He} has ${addA(idToDescription(getRightArmID(slave)))} right arm, but ${addA(idToDescription(getLeftArmID(slave)))} left arm`; } } r += ` and `; @@ -1046,15 +1046,15 @@ App.Desc.limbs = function(slave) { r += `Both of ${his} legs have been amputated`; } else if (!hasBothLegs(slave)) { if (hasLeftLeg(slave)) { - r += `${he} has ` + addA(idToDescription(getLeftLegID(slave))) + ` left leg, but ${his} right has been amputated`; + r += `${he} has ${addA(idToDescription(getLeftLegID(slave)))} left leg, but ${his} right has been amputated`; } else { - r += `${he} has ` + addA(idToDescription(getRightLegID(slave))) + ` right leg, but ${his} left has been amputated`; + r += `${he} has ${addA(idToDescription(getRightLegID(slave)))} right leg, but ${his} left has been amputated`; } } else { if (getLeftLegID(slave) === getRightLegID(slave)) { - r += `${he} has ` + idToDescription(getLeftLegID(slave)) + ` legs`; + r += `${he} has ${idToDescription(getLeftLegID(slave))} legs`; } else { - r += `${his} has ` + addA(idToDescription(getRightLegID(slave))) + ` right leg, but ` + addA(idToDescription(getLeftLegID(slave))) + ` left leg`; + r += `${he} has ${addA(idToDescription(getRightLegID(slave)))} right leg, but ${addA(idToDescription(getLeftLegID(slave)))} left leg`; } } } diff --git a/src/js/slaveStatsChecker.js b/src/js/slaveStatsChecker.js index a7067d1c535e6b9c6d126867f9dba36b0cc0e76e..3da8b90f0fd70481b337e2667ebe1a6291f0584f 100644 --- a/src/js/slaveStatsChecker.js +++ b/src/js/slaveStatsChecker.js @@ -646,7 +646,7 @@ window.canWalk = function(slave) { return false; } else if (tooBigBelly(slave)) { return false; - } else if (slave.heels === 1 && !(slave.shoes === "heels" || slave.shoes === "extreme heels" || slave.shoes === "boots")) { + } else if (slave.heels === 1 && setup.highHeels.includes(slave.shoes)) { return false; } return true;