From 1bcdc734ffb686a8e91fe395d92b653c9f597756 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Wed, 16 Dec 2020 22:42:20 -0500
Subject: [PATCH] fix growth

---
 js/003-data/slaveMods.js             |  2 +-
 src/facilities/salon/salonPassage.js | 45 +++++++++++++++-------------
 2 files changed, 26 insertions(+), 21 deletions(-)

diff --git a/js/003-data/slaveMods.js b/js/003-data/slaveMods.js
index afd60dd33ab..cbbed794d76 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 7d4f9057600..802e8cd5c00 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
-- 
GitLab