From 17ff1d75a4485d0604b90d2602786113af3a413c Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Fri, 18 Dec 2020 11:47:11 -0500
Subject: [PATCH] remove remaining customize

---
 src/npc/startingGirls/startingGirls.js | 126 +++++++++++--------------
 src/npc/startingGirls/startingGirls.tw |  34 +------
 2 files changed, 59 insertions(+), 101 deletions(-)

diff --git a/src/npc/startingGirls/startingGirls.js b/src/npc/startingGirls/startingGirls.js
index 0a9c93f3569..7fe5ba3ca10 100644
--- a/src/npc/startingGirls/startingGirls.js
+++ b/src/npc/startingGirls/startingGirls.js
@@ -247,73 +247,6 @@ App.StartingGirls.uncommittedFamilyTree = function(slave) {
 	renderFamilyTree(tSlaves, slave.ID);
 };
 
-App.StartingGirls.career = function(slave) {
-	let el = new DocumentFragment();
-	let text;
-	let pullDown;
-
-	if (V.AgePenalty === 1) {
-		if (slave.actualAge < 16) {
-			text = "Very young careers: ";
-			pullDown = render(App.Utils.alphabetizeIterable(App.Data.Careers.General.veryYoung));
-		} else if (slave.actualAge <= 24) {
-			text = "Young careers: ";
-			pullDown = render(App.Utils.alphabetizeIterable(App.Data.Careers.General.young));
-		} else if (slave.intelligenceImplant >= 15) {
-			text = "Educated careers: ";
-			pullDown = render(App.Utils.alphabetizeIterable(App.Data.Careers.General.educated));
-		} else {
-			text = "Uneducated careers: ";
-			pullDown = render(App.Utils.alphabetizeIterable(App.Data.Careers.General.uneducated));
-		}
-	} else {
-		if (slave.actualAge < 16) {
-			text = "Very young careers: ";
-			pullDown = render(App.Utils.alphabetizeIterable(App.Data.Careers.General.veryYoung));
-		} else if (slave.intelligenceImplant >= 15) {
-			text = "Educated careers: ";
-			pullDown = render(App.Utils.alphabetizeIterable(App.Data.Careers.General.educated));
-		} else if (slave.actualAge <= 24) {
-			text = "Young careers: ";
-			pullDown = render(App.Utils.alphabetizeIterable(App.Data.Careers.General.young));
-		} else {
-			text = "Uneducated careers: ";
-			pullDown = render(App.Utils.alphabetizeIterable(App.Data.Careers.General.uneducated));
-		}
-	}
-	function render(options) {
-		let select = document.createElement("select");
-		select.classList.add("rajs-list");
-
-		for (const opt of options) {
-			let el = document.createElement("option");
-			el.textContent = capFirstChar(opt);
-			el.value = opt;
-			if (slave.career === opt) {
-				el.selected = true;
-			}
-			select.appendChild(el);
-		}
-		select.onchange = () => {
-			slave.career = select.options[select.selectedIndex].value;
-			jQuery("#career-textbox").empty().append(
-				App.UI.DOM.makeTextBox(
-					slave.career,
-					v => {
-						slave.career = v;
-					},
-					false,
-				)
-			);
-		};
-
-		return select;
-	}
-	el.append(text);
-	el.append(pullDown);
-	return el;
-};
-
 App.StartingGirls.applyPlayerOrigin = function(slave) {
 	switch (V.PC.career) {
 		case "wealth":
@@ -1124,9 +1057,64 @@ App.StartingGirls.profile = function(slave) {
 	const el = new DocumentFragment();
 	const options = new App.UI.OptionsGroup();
 	let r;
-	const {His} = getPronouns(slave);
+	let option;
+	const {His, he} = getPronouns(slave);
+
+	options.addOption("Birth name", "birthName", slave).showTextBox();
+	options.addOption("Slave name", "slaveName", slave).showTextBox();
+	options.addOption("Birth surname", "birthSurname", slave).showTextBox();
+	options.addOption("Slave surname", "slaveSurname", slave).showTextBox();
+
+	option = options.addOption("Career", "career", slave).showTextBox();
+	let careers;
+	let text;
+	if (V.AgePenalty === 1) {
+		if (slave.actualAge < 16) {
+			text = "Very young careers";
+			careers = App.Data.Careers.General.veryYoung;
+		} else if (slave.actualAge <= 24) {
+			text = "Young careers";
+			careers = App.Utils.alphabetizeIterable(App.Data.Careers.General.young);
+		} else if (slave.intelligenceImplant >= 15) {
+			text = "Educated careers";
+			careers = App.Utils.alphabetizeIterable(App.Data.Careers.General.educated);
+		} else {
+			text = "Uneducated careers";
+			careers = App.Utils.alphabetizeIterable(App.Data.Careers.General.uneducated);
+		}
+	} else {
+		if (slave.actualAge < 16) {
+			text = "Very young careers";
+			careers = App.Utils.alphabetizeIterable(App.Data.Careers.General.veryYoung);
+		} else if (slave.intelligenceImplant >= 15) {
+			text = "Educated careers";
+			careers = App.Utils.alphabetizeIterable(App.Data.Careers.General.educated);
+		} else if (slave.actualAge <= 24) {
+			text = "Young careers";
+			careers = App.Utils.alphabetizeIterable(App.Data.Careers.General.young);
+		} else {
+			text = "Uneducated careers";
+			careers = App.Utils.alphabetizeIterable(App.Data.Careers.General.uneducated);
+		}
+	}
+	for (const career of careers) {
+		option.addValue(capFirstChar(career), career);
+	}
+	option.addComment(text).pulldown();
+
+	options.addOption("Origin override", "originOverride", V)
+		.addValue("Enable", 1).on()
+		.addValue("Disable", 0).off();
+
+	if (slave.prestige) {
+		options.addOption("Prestige description", "prestigeDesc", V).showTextBox().addComment("Use complete, capitalized and punctuated sentences.");
+	}
+	options.addOption("Custom description", "desc", slave.custom).showTextBox().addComment("Use complete, capitalized and punctuated sentences.");
+	options.addOption("Custom label", "label", slave.custom).showTextBox().addComment("Use a short phrase");
+
+	options.addOption("Births", "birthsTotal", slave.counter).showTextBox().addComment(`How many times ${he} has already given birth, not necessarily while owned by you.`);
 
-	let option = options.addOption("Devotion", "devotion", slave).showTextBox()
+	option = options.addOption("Devotion", "devotion", slave).showTextBox()
 		.addRange(-100, -95, "<", "Utterly hateful")
 		.addRange(-70, -50, "<", "Hateful")
 		.addRange(-35, -20, "<", "Resistant")
diff --git a/src/npc/startingGirls/startingGirls.tw b/src/npc/startingGirls/startingGirls.tw
index d6dcd5f3c3a..164d9fd53fd 100644
--- a/src/npc/startingGirls/startingGirls.tw
+++ b/src/npc/startingGirls/startingGirls.tw
@@ -200,14 +200,13 @@
 <h2>You are customizing this slave:</h2> <<includeDOM App.Desc.longSlave(V.activeSlave, {market: "generic"})>>
 
 <div class="tab-bar">
-	<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Overview')" id="tab Overview">Overview</button>
+	<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'profile')" id="tab profile">Profile</button>
 	<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Physical')" id="tab Physical">Physical</button>
 	<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Mental')" id="tab Mental">Mental</button>
 	<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Skills')" id="tab Skills">Skills</button>
 	<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Family', App.StartingGirls.uncommittedFamilyTree(V.activeSlave))" id="tab Family">Family</button>
 	<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'body-mods')" id="tab body-mods">Body Mods</button>
 	<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'salon')" id="tab salon">Salon</button>
-	<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Customization')" id="tab Customization">Customization</button>
 	<<if $cash >= _slaveCost>>
 		<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'assignRemove')" id="tab assignRemove">Finalize</button>
 	<<else>>
@@ -217,7 +216,7 @@
 
 <<run App.Utils.setLocalPronouns($activeSlave)>>
 
-<div id="Overview" class="tab-content">
+<div id="profile" class="tab-content">
 	<div class="content">
 		<<includeDOM App.StartingGirls.profile($activeSlave)>>
 	</div>
@@ -413,35 +412,6 @@
 	</div>
 </div>
 
-<div id="Customization" class="tab-content">
-	<div class="content">
-
-	''Birth name:'' <<textbox "$activeSlave.birthName" $activeSlave.birthName "Starting Girls">>
-	| ''Slave name:'' <<textbox "$activeSlave.slaveName" $activeSlave.slaveName "Starting Girls">>
-	<br>''Birth surname:'' <<textbox "$activeSlave.birthSurname" $activeSlave.birthSurname "Starting Girls">>
-	| ''Slave surname:'' <<textbox "$activeSlave.slaveSurname" $activeSlave.slaveSurname "Starting Girls">>
-	<br>''Career:'' <span id="career-textbox"><<textbox "$activeSlave.career" $activeSlave.career "Starting Girls">></span>
-	<span id="careers"></span>
-	<script>jQuery('#careers').empty().append(App.StartingGirls.career(V.activeSlave));</script>
-	<br>Custom origin story: <<textbox "$activeSlave.origin" $activeSlave.origin "Starting Girls">> //Use complete, capitalized and punctuated sentences.//
-	<br>Origin override:
-	<<if $originOverride == 1>>
-		@@.green;Enabled@@ [[Disable|Starting Girls][$originOverride = 0]] //Disabling will allow Starting Girls to overwrite origins and tattoos with its defaults.//
-	<<else>>
-		@@.red;Disabled@@ [[Enable|Starting Girls][$originOverride = 1]] //Enabling will keep your custom origin and tattoo from being overwritten by Starting Girls.//
-	<</if>>
-	<<if $activeSlave.prestige>>
-		<br>Reason for prestigiousness: <<textbox "$activeSlave.prestigeDesc" $activeSlave.prestigeDesc>> //Use complete, capitalized and punctuated sentences.//
-	<</if>>
-	<br>Custom description: <<textbox "$activeSlave.custom.desc" $activeSlave.custom.desc "Starting Girls">> //Use complete, capitalized and punctuated sentences.//
-	<br>Custom label: <<textbox "$activeSlave.custom.label" $activeSlave.custom.label "Starting Girls">> //Use a short phrase.//
-
-	<br><br>
-	''Births:'' <<textbox "$activeSlave.counter.birthsTotal" $activeSlave.counter.birthsTotal "Starting Girls">> //How many times $he has already given birth, not necessarily while owned by you.//
-
-	</div>
-</div>
-
 <div id="assignRemove" class="tab-content">
 	<div class="content">
 
-- 
GitLab