diff --git a/js/003-data/slaveWearData.js b/js/003-data/slaveWearData.js index 0e600dfc122758da67b8127fbb4a047df02a7153..9458b8f9a0d8417d19e3f9cacc250f17d5f31562 100644 --- a/js/003-data/slaveWearData.js +++ b/js/003-data/slaveWearData.js @@ -1136,8 +1136,8 @@ App.Data.slaveWear = { * @property {FC.FutureSociety} [fs] Automatically unlocked with this FS. * @property {boolean} [requirements] * @property {boolean} [harsh] - * @property {0|1|2|3} highHeels 0: No heel boost at all. 1: Pumps, slight boost. 2: High heels. 3: Painfully/extreme high heels - * @property {boolean} [boostsHeight] + * @property {number} heelHeight height in cm. Over 4cm they may totter. 21cm and over (8 inch heels) will be painful/extreme + * @property {number} platformHeight height in cm. Adds to heel height. */ /** @@ -1147,40 +1147,43 @@ App.Data.shoes = new Map([ // TODO: add lift property ["none", { name: "Barefoot", - highHeels: 0, + heelHeight: 0, + platformHeight: 0 } ], ["flats", { name: "Flats", - highHeels: 0, + heelHeight: 0, + platformHeight: 0 } ], ["heels", { name: "Heels", - highHeels: 2, - boostsHeight: true + heelHeight: 13, // 5 inch heels + platformHeight: 0 } ], ["pumps", { name: "Pumps", - highHeels: 1, - boostsHeight: true + heelHeight: 5, // 2 inch heels + platformHeight: 0 } ], ["boots", { name: "Thigh boots", - highHeels: 2, + heelHeight: 13, // 5 inch heels + platformHeight: 0 } ], ["extreme heels", { name: "Painfully extreme heels", - highHeels: 3, - boostsHeight: true + heelHeight: 21, // 8 inch heels + platformHeight: 0 } ], ["platform shoes", @@ -1190,8 +1193,8 @@ App.Data.shoes = new Map([ // TODO: add lift property get requirements() { return (V.boughtItem.shoes.heels === 1); }, - highHeels: 0, - boostsHeight: true + heelHeight: 0, + platformHeight: 8 // 3 inch platform, no heels } ], ["platform heels", @@ -1201,8 +1204,8 @@ App.Data.shoes = new Map([ // TODO: add lift property get requirements() { return (V.boughtItem.shoes.heels === 1); }, - highHeels: 2, - boostsHeight: true + heelHeight: 13, // 8 inches, but not painful like extremes (3 inch platforms) + platformHeight: 8 } ], ["extreme platform heels", @@ -1212,8 +1215,8 @@ App.Data.shoes = new Map([ // TODO: add lift property get requirements() { return (V.boughtItem.shoes.heels === 1); }, - highHeels: 3, - boostsHeight: true + heelHeight: 21, // 12 inches! 8 inch heel, 4 inch platform + platformHeight: 10 } ], ]); diff --git a/src/js/statsChecker/statsChecker.js b/src/js/statsChecker/statsChecker.js index 9370f8e39519f29d6a4ca6f893db4d5fc54910c7..9e122ad6ccd39792d9524ab945bf461a26b08934 100644 --- a/src/js/statsChecker/statsChecker.js +++ b/src/js/statsChecker/statsChecker.js @@ -356,11 +356,11 @@ globalThis.heightPass = function(slave) { } } else if (arcology.FSStatuesqueGlorification !== "unset") { if (arcology.FSStatuesqueGlorificationLaw2 === 1) { - if (slave.height + heelLength(slave) > Height.mean(slave) + 5) { + if (slave.height + shoeHeight(slave) > Height.mean(slave) + 5) { return true; } } else { - if (slave.height + heelLength(slave) >= 170) { + if (slave.height + shoeHeight(slave) >= 170) { return true; } } @@ -368,35 +368,6 @@ globalThis.heightPass = function(slave) { return false; }; -/** - * Returns the height, in cm, of a slave's heels - * @param {App.Entity.SlaveState} slave - * @returns {number} - */ -globalThis.heelLength = function(slave) { - switch (slave.shoes) { - case "pumps": - // 2 inch heels - return 5; - case "platform shoes": - // 3 inch platform, no heels - return 8; - case "heels": - // 5 inch heels - return 13; - case "extreme heels": - // 8 inch heels - return 21; - case "platform heels": - // 8 inches, but not painful like extremes (3 inch platforms) - return 21; - case "extreme platform heels": - // 12 inches! 8 inch heel, 4 inch platform - return 30; - } - return 0; -}; - /** * Returns slave bimbo body degree (FSIntellectualDependencyLawBeauty). * @param {App.Entity.SlaveState} slave diff --git a/src/js/utilsAssessSlave.js b/src/js/utilsAssessSlave.js index 269dd29b1b87b1b6d287e3f645d82c85e5388363..ac6caf627667859267510f2f21fa5b6b5701babf 100644 --- a/src/js/utilsAssessSlave.js +++ b/src/js/utilsAssessSlave.js @@ -244,8 +244,28 @@ globalThis.canMoveToRoom = function(slave) { /** * @param {App.Entity.SlaveState} slave - * @returns {number} + * @returns {0|1|2|3} 0: No heel boost at all. 1: Pumps, slight boost. 2: High heels. 3: Painfully/extreme high heels */ globalThis.shoeHeelHeight = function(slave) { - return App.Data.shoes.get(slave.shoes) ? App.Data.shoes.get(slave.shoes).highHeels : 0; + const height = App.Data.shoes.get(slave.shoes) ? App.Data.shoes.get(slave.shoes).heelHeight : 0; // Height is in cm + if (height > 20) { + return 3; + } else if (height > 8) { + return 2; + } else if (height > 4) { + return 1; + } else { + return 0; + } }; + +/** + * @param {App.Entity.SlaveState} slave + * @returns {number} shoe height in cm (heel + platform height) + */ +globalThis.shoeHeight = function(slave) { + const heelHeight = App.Data.shoes.get(slave.shoes) ? App.Data.shoes.get(slave.shoes).heelHeight : 0; + const platformHeight = App.Data.shoes.get(slave.shoes) ? App.Data.shoes.get(slave.shoes).platformHeight : 0; + return heelHeight + platformHeight; +}; + diff --git a/src/npc/descriptions/dimensions.js b/src/npc/descriptions/dimensions.js index d9ba2acf45869d6d9e1f3c110ba67f42a1330f23..36c9ceda7f1252c50d158d0a29b2594267270aa8 100644 --- a/src/npc/descriptions/dimensions.js +++ b/src/npc/descriptions/dimensions.js @@ -121,16 +121,17 @@ App.Desc.dimensions = function(slave) { const r = []; if (V.arcologies[0].FSStatuesqueGlorification !== "unset") { + const shoesHeight = shoeHeight(slave); if (heightPass(slave)) { r.push(`${He} is tall enough`); - if (App.Data.shoes.get(slave.shoes) && App.Data.shoes.get(slave.shoes).boostsHeight) { - r.push(`in ${his} ${heightToEitherUnit(heelLength(slave))} ${slave.shoes}`); + if (shoesHeight > 0) { + r.push(`in ${his} ${heightToEitherUnit(shoesHeight)} ${slave.shoes}`); } r.push(`to measure up to society's strict tastes.`); } else { r.push(`${He} fails to measure up to society's strict`); - if (App.Data.shoes.get(slave.shoes) && App.Data.shoes.get(slave.shoes).boostsHeight) { - r.push(`tastes even with ${his} ${heightToEitherUnit(heelLength(slave))} ${slave.shoes}`); + if (shoesHeight > 0) { + r.push(`tastes even with ${his} ${heightToEitherUnit(shoesHeight)} ${slave.shoes}`); } else { r.push(`tastes.`); }