From e2f1f6dc42fa049d4ccf5ea4b81d98a01aadd07b Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Fri, 7 May 2021 14:21:51 -0400
Subject: [PATCH] haircuts

---
 devTools/types/FC/human.d.ts         |  2 +-
 js/003-data/slaveMods.js             | 55 +++++++++++++++++-----------
 src/facilities/salon/salonPassage.js |  2 +-
 3 files changed, 35 insertions(+), 24 deletions(-)

diff --git a/devTools/types/FC/human.d.ts b/devTools/types/FC/human.d.ts
index 673183f17dd..543ac50e627 100644
--- a/devTools/types/FC/human.d.ts
+++ b/devTools/types/FC/human.d.ts
@@ -221,7 +221,7 @@ declare global {
 			| "size queen">;
 
 		type BreastShape = "normal" | "perky" | "saggy" | "torpedo-shaped" | "downward-facing" | "wide-set" | "spherical";
-		type HairStyle = "afro"| "braided" | "cornrows" | "curled" | "dreadlocks" | "eary" | "bun" | "messy bun" | "ponytail" | "tails" | "drills" | "luxurious" | "messy" | "neat" | "permed" | "bangs" | "hime" | "strip" | "up" | "shaved" | "trimmed" | "buzzcut" | "bald";
+		type HairStyle = "afro"| "braided" | "cornrows" | "curled" | "dreadlocks" | "eary" | "bun" | "messy bun" | "ponytail" | "tails" | "drills" | "luxurious" | "messy" | "neat" | "permed" | "bangs" | "hime" | "strip" | "up" | "shaved" | "trimmed" | "buzzcut" | "bald" | "undercut";
 		type Diet = "healthy" | "restricted" | "corrective" | "muscle building" | "fattening" | "slimming" | "XX" | "XY" | "XXY" |
 			"cum production" | "cleansing" | "fertility" | "high caloric";
 		type Drug = "no drugs" |
diff --git a/js/003-data/slaveMods.js b/js/003-data/slaveMods.js
index 49f20cd365f..72411ca7525 100644
--- a/js/003-data/slaveMods.js
+++ b/js/003-data/slaveMods.js
@@ -282,6 +282,16 @@ App.Medicine.Modification.Color = {
 	]
 };
 
+/**
+ * @typedef {Object} hairStyle
+ * @property {string} title
+ * @property {FC.HairStyle} value
+ * @property {number} [hLength]
+ */
+
+/**
+ * @type {Object<string, hairStyle[]>}
+ */
 App.Medicine.Modification.hairStyles = {
 	Normal: [
 		{
@@ -382,30 +392,31 @@ App.Medicine.Modification.hairStyles = {
 			hLength: 1
 		},
 	],
-	Length: [
-		{
-			title: "Very short",
-			hLength: 5
-		},
-		{
-			title: "Short",
-			hLength: 10
-		},
-		{
-			title: "Shoulder length",
-			hLength: 30
-		},
-		{
-			title: "Long",
-			hLength: 60
-		},
-		{
-			title: "Very long",
-			hLength: 100
-		},
-	]
 };
 
+App.Medicine.Modification.hLength = [
+	{
+		title: "Very short",
+		hLength: 5
+	},
+	{
+		title: "Short",
+		hLength: 10
+	},
+	{
+		title: "Shoulder length",
+		hLength: 30
+	},
+	{
+		title: "Long",
+		hLength: 60
+	},
+	{
+		title: "Very long",
+		hLength: 100
+	},
+];
+
 App.Medicine.Modification.eyeColor = [
 	{value: "amber"},
 	{value: "black"},
diff --git a/src/facilities/salon/salonPassage.js b/src/facilities/salon/salonPassage.js
index 00dba29238b..50d64781d12 100644
--- a/src/facilities/salon/salonPassage.js
+++ b/src/facilities/salon/salonPassage.js
@@ -265,7 +265,7 @@ App.UI.salon = function(slave, cheat = false) {
 			// Length
 			option = options.addOption(`${hasWig ? "Find longer or shorter wig" : "Cut or lengthen hair"}`, "hLength", slave);
 			if (slave.hLength > 0) {
-				for (const style of App.Medicine.Modification.hairStyles.Length) {
+				for (const style of App.Medicine.Modification.hLength) {
 					if (
 						(style.hasOwnProperty("requirements") && !style.requirements(slave)) ||
 						(style.hLength && style.hLength > slave.hLength)
-- 
GitLab