diff --git a/js/003-data/slaveMods.js b/js/003-data/slaveMods.js index afd60dd33abd5716cf33278d5cf683426ffc846f..cbbed794d763e761bb91bcc346dc4792e4ce7d45 100644 --- a/js/003-data/slaveMods.js +++ b/js/003-data/slaveMods.js @@ -395,7 +395,7 @@ App.Medicine.Modification.hairStyles = { { title: "Apply extensions", onApplication: function(slave) { slave.hLength += 10; }, - requirements: slave => !slave.bald && slave.hLength < 150 + requirements: slave => !slave.bald && slave.hLength < 150 && slave.hLength > 0 }, ] }; diff --git a/src/facilities/salon/salonPassage.js b/src/facilities/salon/salonPassage.js index 7d4f9057600bc7fa9fcc6fd581bb23616b3b7943..802e8cd5c00c3932335b357a680bf77c34b70e39 100644 --- a/src/facilities/salon/salonPassage.js +++ b/src/facilities/salon/salonPassage.js @@ -221,28 +221,33 @@ App.UI.salon = function(slave, cheat = false) { // Length option = options.addOption(`${hasWig ? "Find longer or shorter wig" : "Cut or lengthen hair"}`, "hLength", slave); - for (const style of App.Medicine.Modification.hairStyles.Length) { - if ( - (style.hasOwnProperty("requirements") && !style.requirements(slave)) || - (style.hLength && style.hLength > slave.hLength) - ) { - continue; + if (slave.hLength > 0) { + for (const style of App.Medicine.Modification.hairStyles.Length) { + if ( + (style.hasOwnProperty("requirements") && !style.requirements(slave)) || + (style.hLength && style.hLength > slave.hLength) + ) { + continue; + } + const length = style.hasOwnProperty("hLength") ? style.hLength : slave.hLength; + option.customButton( + style.title, + () => { + if (style.hasOwnProperty("hLength")) { + slave.hLength = style.hLength; + } + if (style.hasOwnProperty("onApplication")) { + style.onApplication(slave); + } + billMod(); + }, + "Salon" + ); } - const length = style.hasOwnProperty("hLength") ? style.hLength : slave.hLength; - option.customButton( - style.title, - () => { - if (style.hasOwnProperty("hLength")) { - slave.hLength = style.hLength; - } - if (style.hasOwnProperty("onApplication")) { - style.onApplication(slave); - } - billMod(); - }, - "Salon" - ); + } else { + option.addValue("Apply hair growth stimulating treatment", 1); } + option.showTextBox(); // Maintain