From 213532703ea4b13d341c8865e438be830c8d2478 Mon Sep 17 00:00:00 2001
From: Arkerthan <arkerthan@gmail.com>
Date: Sat, 11 Jan 2020 23:57:09 +0100
Subject: [PATCH] add headers to prosthetic lab

---
 devNotes/colorCSS.txt            |   6 +-
 src/gui/css/mainStyleSheet.css   |   4 +-
 src/interaction/prostheticLab.tw | 110 ++++++++++++++++---------------
 src/js/utilsFC.js                |   2 +-
 4 files changed, 65 insertions(+), 57 deletions(-)

diff --git a/devNotes/colorCSS.txt b/devNotes/colorCSS.txt
index 4fcf789f3b4..87d52a8578a 100644
--- a/devNotes/colorCSS.txt
+++ b/devNotes/colorCSS.txt
@@ -55,4 +55,8 @@ MONEY
 .cash.inc - yellowgreen
 
 FLAWS
-.flaw.gain - red
\ No newline at end of file
+.flaw.gain - red
+
+GENERAL
+.error - red
+.noteworthy - yellow
\ No newline at end of file
diff --git a/src/gui/css/mainStyleSheet.css b/src/gui/css/mainStyleSheet.css
index d623c8ff711..a24daf53473 100644
--- a/src/gui/css/mainStyleSheet.css
+++ b/src/gui/css/mainStyleSheet.css
@@ -213,14 +213,14 @@ span.zeroButton > a:hover { text-decoration: none; }
 .orangered, .orangered a, .trust.inc-defiant, .trust.inc-defiant a { color: orangered }
 .orchid, .orchid a { color: orchid } /* used once (wrong? */
 .pink, .pink a { color: pink } /* also fetish start ??? , and a lot of other stuff */
-.red, .red a, .health.dec, .health.dec a, .cash.dec, .cash.dec a, .flaw.gain, .flaw.gain a { color: red } /* also generally bad stuff */
+.red, .red a, .health.dec, .health.dec a, .cash.dec, .cash.dec a, .flaw.gain, .flaw.gain a, .error, .error a { color: red } /* also generally bad stuff */
 .seagreen, .seagreen a { color: seagreen }
 .springgreen, .springgreen a, .skill.advantage, .skill.advantage a { color: springgreen }
 .tan, .tan a { color: tan } /* some ethnicity */
 .chocolate, .chocolate a { color: chocolate }
 .saddlebrown, .saddlebrown a { color: saddlebrown }
 .teal, .teal a { color: teal }
-.yellow, .yellow a { color: yellow }
+.yellow, .yellow a, .noteworthy, .noteworthy a { color: yellow }
 .yellowgreen, .yellowgreen a, .cash.inc, .cash.inc a { color: yellowgreen } /* maybe only positive cash? */
 
 /*! <<checkvars>> macro for SugarCube 2.x */
diff --git a/src/interaction/prostheticLab.tw b/src/interaction/prostheticLab.tw
index dfb30a212bb..598863b10aa 100644
--- a/src/interaction/prostheticLab.tw
+++ b/src/interaction/prostheticLab.tw
@@ -4,31 +4,31 @@
 
 <<set $researchLab.speed = (($researchLab.hired * 3) + $researchLab.menials) * $researchLab.aiModule>>
 
-Prosthetic Lab
-<hr><br>
+<h1>Prosthetic Lab</h1>
+
 
 <<if $adjustProsthetics.length > $adjustProstheticsCompleted>>
-	Currently adjusting these prosthetics:<br>
+	<h2>External contract workers</h2>
+	Currently adjusting these prosthetics:
 	<<for _p range $adjustProsthetics>>
 		<<if _p.workLeft > 0>>
-			&nbsp;&nbsp;<<= capFirstChar(setup.prosthetics[_p.id].name)>> for <<= SlaveFullName($slaves[$slaveIndices[_p.slaveID]])>><br>
+			<div class="indent">
+				<<= capFirstChar(setup.prosthetics[_p.id].name)>> for <<= SlaveFullName($slaves[$slaveIndices[_p.slaveID]])>>
+			</div>
 		<</if>>
 	<</for>>
-<<else>>
-	//Currently there are no prosthetics being fit to a slave.//
 <</if>>
 
 <<if $researchLab.level > 0>>
-	<br><br>Research Department
-	<hr>
+	<h2>Research Department</h2>
 	//You switch one of the screens in your office to the feed from your research facility.//
 
-	<br><br>
-	__Personnel__
-	<br><br>
+	<h3>Personnel</h3>
 
 	<<if $researchLab.aiModule == 1>>
-		[[Buy and install research module|Prosthetic Lab][cashX(forceNeg(35000*$upgradeMultiplierArcology), "capEx"), $researchLab.aiModule = 2]] //This module enables your personal assistant to assist staff and direct menials assigned to your research facility, increasing efficiency. It costs <<= cashFormat(35000*$upgradeMultiplierArcology)>>//<br>
+		<div>
+			[[Buy and install research module|Prosthetic Lab][cashX(forceNeg(35000*$upgradeMultiplierArcology), "capEx"), $researchLab.aiModule = 2]] //This module enables your personal assistant to assist staff and direct menials assigned to your research facility, increasing efficiency. It costs <<= cashFormat(35000*$upgradeMultiplierArcology)>>//
+		</div>
 	<</if>>
 	<<if ($researchLab.hired + $researchLab.menials) == 0>>
 		//Facility is currently unstaffed.//
@@ -49,9 +49,9 @@ Prosthetic Lab
 			<<setAssistantPronouns>>
 			<<if $researchLab.aiModule > 1>>Occasionally you hear the voice of your assistant as _heA helps direct and organize work.<</if>>//
 	<</if>>
-	<br>
 
-	&nbsp;Currently, this facility can employ $researchLab.maxSpace people.
+	<div class="indent">
+	Currently, this facility can employ $researchLab.maxSpace people.
 	<<if $researchLab.maxSpace == 5>>
 		[[Expand facility|Prosthetic Lab][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $researchLab.maxSpace = 10]]
 		//Costs <<= cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
@@ -70,9 +70,11 @@ Prosthetic Lab
 	<<elseif $researchLab.maxSpace == 50>>
 		//Facility is fully expanded.//
 	<</if>>
-	<br><br>&nbsp;
-
+	</div>
+	
+	<div style="padding-top:1em">
 	<<if ($researchLab.hired + $researchLab.menials) < $researchLab.maxSpace>>
+		<div>
 		Hire [[x1|Prosthetic Lab][$researchLab.hired += 1,cashX(-2000, "lab")]]
 		<<if ($researchLab.maxSpace - ($researchLab.hired + $researchLab.menials)) >= 5>>
 			| [[x5|Prosthetic Lab][$researchLab.hired += 5,cashX(-10000, "lab")]]
@@ -80,9 +82,12 @@ Prosthetic Lab
 		<<if ($researchLab.maxSpace - ($researchLab.hired + $researchLab.menials)) >= 10>>
 			| [[x10|Prosthetic Lab][$researchLab.hired += 10,cashX(-10000, "lab")]]
 		<</if>>
-		scientists.<br>
-		&nbsp;&nbsp;&nbsp;//Each scientist will require an initial fee of <<= cashFormat(2000)>> and incur <<= cashFormat(300)>> weekly.//
-		<br>
+		scientists.
+		</div>
+		<div class="indent">
+		//Each scientist will require an initial fee of <<= cashFormat(2000)>> and incur <<= cashFormat(300)>> weekly.//
+		</div>
+		<div>
 		<<if $menials > 0>>
 			Assign [[x1|Prosthetic Lab][$researchLab.menials += 1,$menials -= 1]]
 			<<if ($researchLab.maxSpace - ($researchLab.hired + $researchLab.menials)) >= 5 && $menials >= 5>>
@@ -91,15 +96,22 @@ Prosthetic Lab
 			<<if ($researchLab.maxSpace - ($researchLab.hired + $researchLab.menials)) >= 10 && $menials >= 10>>
 				| [[x10|Prosthetic Lab][$researchLab.menials += 10,$menials -= 10]]
 			<</if>>
-			menial slaves to lab.<br>
-		<<else>>You do not own any <<if $researchLab.menials != 0>>unassigned <</if>>menial slaves.<br>
+			menial slaves to lab.
+		<<else>>
+			You do not own any <<if $researchLab.menials != 0>>unassigned <</if>>menial slaves.
 		<</if>>
-		&nbsp;&nbsp;&nbsp;//Using menial slaves is much cheaper than hiring scientists, but they are less effective. <<= cashFormat(100)>> per slave each week.//<br>
+		</div>
+		<div class="indent">
+		//Using menial slaves is much cheaper than hiring scientists, but they are less effective. <<= cashFormat(100)>> per slave each week.//
+		</div>
 	<<else>>
-		&nbsp;&nbsp;&nbsp;//Facility is fully staffed.//
+		<div class="indent">//Facility is fully staffed.//</div>
 	<</if>>
-	<br>
-	<<if $researchLab.hired > 0>>&nbsp;
+	</div>
+
+	<div style="padding-top:1em">
+	<<if $researchLab.hired > 0>>
+		<div>
 		Fire [[x1|Prosthetic Lab][$researchLab.hired -= 1]]
 		<<if $researchLab.hired >= 5>>
 			| [[x5|Prosthetic Lab][$researchLab.hired -= 5]]
@@ -109,8 +121,10 @@ Prosthetic Lab
 		<</if>>
 		| [[All|Prosthetic Lab][$researchLab.hired = 0]]
 		scientists.
+		</div>
 	<</if>>
-	<<if $researchLab.menials > 0>><br>&nbsp;
+	<<if $researchLab.menials > 0>>
+		<div>
 		Dismiss [[x1|Prosthetic Lab][$researchLab.menials -= 1,$menials += 1]]
 		<<if $researchLab.menials >= 5>>
 			| [[x5|Prosthetic Lab][$researchLab.menials -= 5,$menials += 5]]
@@ -120,13 +134,10 @@ Prosthetic Lab
 		<</if>>
 		| [[All|Prosthetic Lab][$menials += $researchLab.menials, $researchLab.menials = 0]]
 		menial slaves.
+		</div>
 	<</if>>
 
-	<br><br>
-
-	__Tasks__
-
-	<br><br>
+	<h3>Tasks</h3>
 
 	<<if $researchLab.tasks.length > 0>>
 		<<set _j = 0>>
@@ -137,19 +148,19 @@ Prosthetic Lab
 		<</if>>
 		<br>
 		<<for _i = 0; _i < $researchLab.tasks.length; _i++>>
-			&nbsp;
+			<div class="indent">
 			<<switch $researchLab.tasks[_i].type>>
 			<<case "research">>
 				You <<if _i == 0>>are researching<<else>> plan to research<</if>>
 			<<case "craft">>
 				You <<if _i == 0>>are constructing<<else>> plan to construct<</if>>
 			<<case "craftFit">>
-				For @@.yellow;<<= SlaveFullName($slaves[$slaveIndices[$researchLab.tasks[_i].slaveID]])>>@@ you <<if _i == 0>>are constructing<<else>> plan to construct<</if>>
+				For @@.noteworthy;<<= SlaveFullName($slaves[$slaveIndices[$researchLab.tasks[_i].slaveID]])>>@@ you <<if _i == 0>>are constructing<<else>> plan to construct<</if>>
 			<<default>>
-				@@.red;Error: Unknown $researchLab.tasks[].type: $researchLab.tasks[_i].type@@
+				@@.error;Error: Unknown $researchLab.tasks[].type: $researchLab.tasks[_i].type@@
 			<</switch>>
 			<<set _j += $researchLab.tasks[_i].workLeft>>
-			@@.yellow;<<= capFirstChar(setup.prosthetics[$researchLab.tasks[_i].id].name)>>@@.
+			@@.noteworthy;<<= capFirstChar(setup.prosthetics[$researchLab.tasks[_i].id].name)>>@@.
 			<<if $researchLab.speed > 0>>
 				Finished in approximately <<= (Math.floor(_j / $researchLab.speed) + 1)>> week(s).
 			<</if>>
@@ -167,57 +178,50 @@ Prosthetic Lab
 					<<set $researchLab.tasks.deleteAt(_i)>>
 				<</link>>
 			<</capture>>
-
-			<br>
+			</div>
 		<</for>>
 	<<else>>
 		//Currently the research lab has no tasks planned.//
 	<</if>>
 
-	<br><br>
-
-	__Research__
-	<br><br>
+	<h3>Research</h3>
 
-	&nbsp;Available research projects:<br>
+	Available research projects:
 	<<for _p range setup.prostheticIDs>>
 		<<if $prosthetics[_p].research == 0>>
 			<<if _p != "erectile">> /*excludes erectile*/
-			&nbsp;&nbsp;
+			<div class="indent">
 			<<if setup.prosthetics[_p].level <= $prostheticsUpgrade>>
 				<<capture _p>>
-				<<link "Reverse engineer <<= capFirstChar(setup.prosthetics[_p].name)>>" "Prosthetic Lab">>
+				<<link "Reverse engineer <<= addA(setup.prosthetics[_p].name)>>" "Prosthetic Lab">>
 					<<set cashX(forceNeg(setup.prosthetics[_p].costs), "lab"), $prosthetics[_p].research = -1, $researchLab.tasks.push({type: "research", id: _p, workLeft: setup.prosthetics[_p].research})>>
 				<</link>>
 				<</capture>>
 					//Costs <<= cashFormat(setup.prosthetics[_p].costs)>> of initial investment.//
 			<<else>>
-				//You need better contracts to get the required research material for reverse engineering <<= capFirstChar(setup.prosthetics[_p].name)>>.//
+				//You need better contracts to get the required research material for reverse engineering <<= addA(setup.prosthetics[_p].name)>>.//
 			<</if>>
-			<br>
+			</div>
 			<</if>>
 		<</if>>
 	<</for>>
 
-	<br><br>
-	__Manufacture__
-	<br><br>&nbsp;
+	<h3>Manufacture</h3>
 
-	Available building projects:<br>
+	Available building projects:
 	<<for _p range setup.prostheticIDs>>
 		<<if $prosthetics[_p].research == 1>>
 			<<if _p != "erectile">> /*excludes erectile*/
-			&nbsp;&nbsp;
+			<div class="indent">
 			<<capture _p>>
 			<<link "Build <<= addA(setup.prosthetics[_p].name)>>" "Prosthetic Lab">>
 				<<set $researchLab.tasks.push({type: "craft", id: _p, workLeft: setup.prosthetics[_p].craft})>>
 			<</link>>
 			<</capture>>
-			<br>
+			</div>
 			<</if>>
 		<</if>>
 	<</for>>
 
-	<br><br>
 	<<= ResearchLabStockPile()>>
 <</if>>
diff --git a/src/js/utilsFC.js b/src/js/utilsFC.js
index 7dcd0a5a439..4991f795c44 100644
--- a/src/js/utilsFC.js
+++ b/src/js/utilsFC.js
@@ -1557,7 +1557,7 @@ window.induceLactation = function induceLactation(slave) {
 	return r;
 };
 window.ResearchLabStockPile = function() {
-	return "<h3>Prosthetics</h3>" +
+	return "<h3>Prepared prosthetics</h3>" +
 		`Prosthetics interfaces: ${num(V.prosthetics.interfaceP1.amount + V.prosthetics.interfaceP2.amount)}
 	&nbsp;Basic: $prosthetics.interfaceP1.amount
 	&nbsp;Advanced: $prosthetics.interfaceP2.amount
-- 
GitLab