From 8c7260d42069c217331b4a32912be091bda3a40f Mon Sep 17 00:00:00 2001
From: Svornost <11434-svornost@users.noreply.gitgud.io>
Date: Sun, 17 Dec 2023 15:05:21 -0500
Subject: [PATCH] Type fixes, and fixes found by typechecks

---
 src/art/vector/VectorArtJS.js          | 22 +++++++++++++---------
 src/endWeek/player/prDrugs.js          |  2 +-
 src/facilities/surgery/multiImplant.js |  1 +
 src/interaction/main/mainLinks.js      | 10 +++++-----
 src/js/wombJS.js                       |  2 +-
 5 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/src/art/vector/VectorArtJS.js b/src/art/vector/VectorArtJS.js
index f6f27e361c0..e34bee4be6c 100644
--- a/src/art/vector/VectorArtJS.js
+++ b/src/art/vector/VectorArtJS.js
@@ -470,14 +470,14 @@ App.Art.makeVectorArtStyle = function(slave, artSize) {
 
 		function setEarTColor() {
 			/* mainly for catmod */
-			if (slave.earT != "none"){
+			if (slave.earT !== "none") {
 				earTColor = extractColor(slave.earTColor);
 			}
 		}
 
 		function setTailColor() {
 			/* mainly for catmod */
-			if (slave.tailShape != "none"){
+			if (slave.tailShape !== "none") {
 				tailColor = extractColor(slave.tailColor);
 			}
 		}
@@ -1139,11 +1139,13 @@ App.Art.vectorArtElement = (function() {
 
 	function ArtVectorTail() {
 		switch (slave.tailShape) {
-			case "neko":
 			case "cat":
+			case "leopard":
+			case "tiger":
+			case "jaguar":
 				svgQueue.add("Art_Vector_Cat_Tail");
 				break;
-			case "kit":
+			case "kitsune":
 			case "fox":
 				svgQueue.add("Art_Vector_Fox_Tail");
 				break;
@@ -2030,7 +2032,7 @@ App.Art.vectorArtElement = (function() {
 						switch (slave.hStyle) {
 							case "buzzcut":
 							case "shaved":
-							case "shaved bald":
+							case "bald":
 								svgQueue.add("Art_Vector_Hair_Back_NoHair");
 								break;
 							case "afro":
@@ -2070,11 +2072,12 @@ App.Art.vectorArtElement = (function() {
 		}
 		/* note: latex clothing actually shows some hair, but there is no appropriate art for it */
 		switch (slave.earT) {
-			case "neko":
+			case "leopard":
+			case "tiger":
+			case "jaguar":
 			case "cat":
 				svgQueue.add("Art_Vector_Cat_Ear_Back");
 				break;
-			case "kit":
 			case "fox":
 				svgQueue.add("Art_Vector_Fox_Ear_Back");
 				break;
@@ -2179,11 +2182,12 @@ App.Art.vectorArtElement = (function() {
 		}
 		/* note: latex clothing actually shows some hair, but there is no appropriate art for it */
 		switch (slave.earT) {
-			case "neko":
+			case "leopard":
+			case "tiger":
+			case "jaguar":
 			case "cat":
 				svgQueue.add("Art_Vector_Cat_Ear_Fore");
 				break;
-			case "kit":
 			case "fox":
 				svgQueue.add("Art_Vector_Fox_Ear_Fore");
 				break;
diff --git a/src/endWeek/player/prDrugs.js b/src/endWeek/player/prDrugs.js
index 4b7be0f3c2a..b86e3868616 100644
--- a/src/endWeek/player/prDrugs.js
+++ b/src/endWeek/player/prDrugs.js
@@ -837,7 +837,7 @@ App.EndWeek.Player.drugs = function(PC = V.PC) {
 				} else if (PC.diet === PCDiet.FERTILITY) {
 					r.push(`The fertility enhancing hormones in your food slightly disrupts your growth.`);
 					growth -= 0.1;
-				} else if (PC.diet === PCDiet.MALE || PC.PCDiet === Diet.FEMALE || PC.PCDiet === Diet.FUTA) {
+				} else if (PC.diet === PCDiet.MALE || PC.diet === PCDiet.FEMALE || PC.diet === PCDiet.FUTA) {
 					r.push(`The fertility hormones in your food inhibits growth.`);
 					growth -= 0.5;
 				} else if (PC.diet === PCDiet.CLEANSE) {
diff --git a/src/facilities/surgery/multiImplant.js b/src/facilities/surgery/multiImplant.js
index a1d98318426..e35f5de192a 100644
--- a/src/facilities/surgery/multiImplant.js
+++ b/src/facilities/surgery/multiImplant.js
@@ -256,6 +256,7 @@ App.UI.multipleOrganImplant = function() {
 						}
 						break;
 					default:
+						// @ts-expect-error - p.id must be inferred as `never` if the switch is exhaustive
 						App.UI.DOM.appendNewElement("span", div, `Since there is no automated procedure to implant/attach ${App.Data.prosthetics[p.id].name} it will be put into storage.`, "note");
 				}
 			}
diff --git a/src/interaction/main/mainLinks.js b/src/interaction/main/mainLinks.js
index f3766f80e8e..8a94d7f4a8c 100644
--- a/src/interaction/main/mainLinks.js
+++ b/src/interaction/main/mainLinks.js
@@ -42,7 +42,7 @@ App.UI.View.mainLinks = function() {
 				fragment.append(`You plan to make some easy (but dirty) money this week.`);
 				break;
 			case PersonalAttention.FIGHT:
-				text.push(`You plan to enter a fistfight for some quick (but hopefully not too bloody) money this week.`);
+				fragment.append(`You plan to enter a fistfight for some quick (but hopefully not too bloody) money this week.`);
 				break;
 			case PersonalAttention.SUPPORTHG:
 				fragment.append(`You plan to support your Head Girl this week, `);
@@ -60,16 +60,16 @@ App.UI.View.mainLinks = function() {
 				fragment.append(`You plan to take it easy this week.`);
 				break;
 			case PersonalAttention.STUDY:
-				text.push(`This week you will work on getting a general education.`);
+				fragment.append(`This week you will work on getting a general education.`);
 				break;
 			case PersonalAttention.GED:
-				text.push(`This week you are taking a test to prove you have a general education.`);
+				fragment.append(`This week you are taking a test to prove you have a general education.`);
 				break;
 			case PersonalAttention.EDUCATION:
-				text.push(`This week you are pursuing an advanced education.`);
+				fragment.append(`This week you are pursuing an advanced education.`);
 				break;
 			case PersonalAttention.TEST:
-				text.push(`This week you are attempting to complete your advanced education.`);
+				fragment.append(`This week you are attempting to complete your advanced education.`);
 				break;
 			case PersonalAttention.TRADE:
 				fragment.append(`This week you will learn trading.`);
diff --git a/src/js/wombJS.js b/src/js/wombJS.js
index efef5349faf..0d923bfd934 100644
--- a/src/js/wombJS.js
+++ b/src/js/wombJS.js
@@ -823,7 +823,7 @@ globalThis.WombRemoveReservedFetuses = function(actor, type) {
 globalThis.WombCleanAllReserve = function(actor) {
 	actor.womb.forEach(function(ft) {
 		ft.reserve = "";
-		delete fetus.tankSetting;
+		delete ft.tankSetting;
 	});
 };
 
-- 
GitLab