From 959196dbdac8c4cf596d4fd1e4145aef6f0f954d Mon Sep 17 00:00:00 2001
From: Arkerthan <arkerthan@mailbox.org>
Date: Thu, 10 Feb 2022 18:39:12 +0100
Subject: [PATCH] Make sure starting girls remebers changes done in salon

---
 src/facilities/salon/salonPassage.js          | 11 ++++++++---
 src/js/salon.js                               |  2 +-
 src/npc/startingGirls/startingGirls.js        |  7 +++++++
 src/npc/startingGirls/startingGirlsPassage.js |  2 +-
 4 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/facilities/salon/salonPassage.js b/src/facilities/salon/salonPassage.js
index d4b4e07a90d..ca637f7341e 100644
--- a/src/facilities/salon/salonPassage.js
+++ b/src/facilities/salon/salonPassage.js
@@ -1,9 +1,10 @@
 /**
  * UI for the Salon. Refreshes without refreshing the passage.
  * @param {App.Entity.SlaveState} slave
- * @param {boolean} cheat if true, will hide scenes and keep the player from being billed for changes.
+ * @param {boolean} [cheat=false] if true, will hide scenes and keep the player from being billed for changes.
+ * @param {boolean} [startingGirls=false] change systems for starting girls
  */
-App.UI.salon = function(slave, cheat = false) {
+App.UI.salon = function(slave, cheat = false, startingGirls = false) {
 	const container = document.createElement("span");
 	container.id = "salon";
 	const {
@@ -20,7 +21,11 @@ App.UI.salon = function(slave, cheat = false) {
 			App.Events.drawEventArt(el, slave);
 			el.append(intro());
 		}
-		el.append(eyewear());
+		if (!startingGirls) {
+			// Starting girls has its own, more powerful, eye modifier which interferes with this one.
+			// TODO: unify them
+			el.append(eyewear());
+		}
 		if (
 			(["leopard", "tiger", "jaguar"].includes(slave.earT) && slave.earTColor !== "hairless")
 			|| ["leopard", "tiger", "jaguar", "gazelle", "tanuki", "raccoon"].includes(slave.tailShape)
diff --git a/src/js/salon.js b/src/js/salon.js
index 127a647bc8a..356efbee4e2 100644
--- a/src/js/salon.js
+++ b/src/js/salon.js
@@ -1,6 +1,6 @@
 /**
  * @param {FC.HumanState} entity
- * @param {boolean} cheat
+ * @param {boolean} [cheat=false]
  * @returns {HTMLDivElement}
  */
 App.Medicine.Modification.eyeSelector = function(entity, cheat = false) {
diff --git a/src/npc/startingGirls/startingGirls.js b/src/npc/startingGirls/startingGirls.js
index 7fec854b225..1e23b54ad88 100644
--- a/src/npc/startingGirls/startingGirls.js
+++ b/src/npc/startingGirls/startingGirls.js
@@ -2059,8 +2059,15 @@ App.StartingGirls.finalize = function(slave) {
 			if (slave.pregSource === -1) {
 				V.PC.counter.slavesKnockedUp++;
 			}
+			// Make newSlave keep certain changes
+			slave.override_H_Color = 1;
+			slave.override_Arm_H_Color = 1;
+			slave.override_Brow_H_Color = 1;
+			slave.override_Skin = 1;
+
 			newSlave(clone(slave));
 		};
+
 		if (V.cash - cost > minimumSlaveCost()) {
 			const {him} = getPronouns(slave);
 			App.UI.DOM.appendNewElement("div", el,
diff --git a/src/npc/startingGirls/startingGirlsPassage.js b/src/npc/startingGirls/startingGirlsPassage.js
index b6ef844e4bb..9bed3894a16 100644
--- a/src/npc/startingGirls/startingGirlsPassage.js
+++ b/src/npc/startingGirls/startingGirlsPassage.js
@@ -404,7 +404,7 @@ App.StartingGirls.passage = function() {
 	tabBar.addTab("Stats", "stats", App.StartingGirls.stats(V.activeSlave));
 	tabBar.addTab("Family", "family", App.Intro.editFamily(V.activeSlave));
 	tabBar.addTab("Body Mods", "body-mods", App.UI.bodyModification(V.activeSlave, true));
-	tabBar.addTab("Salon", "salon", App.UI.salon(V.activeSlave, true));
+	tabBar.addTab("Salon", "salon", App.UI.salon(V.activeSlave, true, true));
 	tabBar.addTab("Finalize", "finalize", App.StartingGirls.finalize(V.activeSlave),
 		startingSlaveCost(V.activeSlave) > V.cash ? "show-warning" : undefined);
 	el.append(tabBar.render());
-- 
GitLab