From 288c1511dfc3f1e2b84d0622f50d042713a557eb Mon Sep 17 00:00:00 2001
From: LollipopScythe <11764-LollipopScythe@users.noreply.gitgud.io>
Date: Wed, 20 Dec 2023 21:57:15 +0000
Subject: [PATCH] Bug Fixes

---
 game/04-Variables/variables-versionUpdate.twee | 12 ++++++++++--
 game/base-clothing/updateClothes.js            |  5 +++++
 game/base-system/overlays/featsUI.twee         |  4 ++--
 game/base-system/time/time.js                  |  9 +++++----
 game/overworld-plains/loc-farm/cottage.twee    |  2 ++
 game/overworld-town/loc-sea/main.twee          |  2 +-
 game/special-masturbation/actions.js           |  2 +-
 7 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/game/04-Variables/variables-versionUpdate.twee b/game/04-Variables/variables-versionUpdate.twee
index ff6d6a82d6..cda9087873 100644
--- a/game/04-Variables/variables-versionUpdate.twee
+++ b/game/04-Variables/variables-versionUpdate.twee
@@ -3593,9 +3593,9 @@
 		<<set $objectVersion.specialClothes to 14>>
 	<</if>>
 
-	<<if $objectVersion.wardrobes lt 6 or $objectVersion.wardrobes is undefined>>
+	<<if $objectVersion.wardrobes lt 7 or $objectVersion.wardrobes is undefined>>
 		<<wardrobesUpdate>>
-		<<set $objectVersion.wardrobes to 6>>
+		<<set $objectVersion.wardrobes to 7>>
 	<</if>>
 
 	<<if $objectVersion.museumAntiques lte 14 and $museumAntiques.antiques.antiquewhitescrystal isnot undefined>>
@@ -4796,4 +4796,12 @@
 			moneyModifier: 0
 		}>>
 	<</if>>
+	<<if $outfit_update is undefined or $outfit_update lt 4>>
+		<<set $outfit_update to 4>>
+		<<for $_i to 0; $_i lt $outfit.length; $_i++>>
+			<<if $outfit[$_i].handheld is undefined>>
+				<<set $outfit[$_i].handheld to "naked">>
+			<</if>>
+		<</for>>
+	<</if>>
 <</widget>>
diff --git a/game/base-clothing/updateClothes.js b/game/base-clothing/updateClothes.js
index c8a4d8f0fa..156961df00 100644
--- a/game/base-clothing/updateClothes.js
+++ b/game/base-clothing/updateClothes.js
@@ -325,5 +325,10 @@ function wardrobesUpdate() {
 		V.wardrobes.pirate.unlocked = V.pirate_rank >= 0;
 		V.wardrobes.pirate.space = 5;
 	}
+	if (V.objectVersion.wardrobes < 7) {
+		Object.values(V.wardrobes).forEach(wardrobe => {
+			if (wardrobe && Array.isArray(wardrobe.upper) && !wardrobe.handheld) wardrobe.handheld = [];
+		});
+	}
 }
 DefineMacro("wardrobesUpdate", wardrobesUpdate);
diff --git a/game/base-system/overlays/featsUI.twee b/game/base-system/overlays/featsUI.twee
index 70e0fc2314..cc2cccb09b 100644
--- a/game/base-system/overlays/featsUI.twee
+++ b/game/base-system/overlays/featsUI.twee
@@ -48,7 +48,7 @@
 	<<set _filter to "All">>
 	<<set _keys to Object.keys(setup.feats)>>
 	<<for _i to 0; _i lt _keys.length; _i++>>
-		<<if _skip.includes(setup.feats[_keys[_i]].series) or !setup.feats[_keys[_i]].filter.includes($feats.filter)>>
+		<<if !setup.feats[_keys[_i]].filter.includes($feats.filter)>>
 			<<continue>>
 		<</if>>
 		<<if Object.keys($feats.currentSave).includes(_keys[_i])>>
@@ -57,7 +57,7 @@
 			<<set _owned to 1>>
 		<<else>>
 			<<set _owned to 0>>
-			<<if setup.feats[_keys[_i]].hidden>>
+			<<if setup.feats[_keys[_i]].hidden or _skip.includes(setup.feats[_keys[_i]].series)>>
 				<<continue>>
 			<</if>>
 			<<if setup.feats[_keys[_i]].series isnot "">>
diff --git a/game/base-system/time/time.js b/game/base-system/time/time.js
index 63a5f5293d..62292fcfd3 100644
--- a/game/base-system/time/time.js
+++ b/game/base-system/time/time.js
@@ -346,7 +346,7 @@ function weekPassed() {
 		fragment.append(wikifier("robinPunishment", "docks"));
 		V.robineventnote = 1;
 	}
-    V.robinmoney += (300 + V.robin.moneyModifier);
+	V.robinmoney += 300 + V.robin.moneyModifier;
 	V.compoundcentre = 0;
 	if (V.edenfreedom >= 1 && V.edenshopping === 2) V.edenshopping = 0;
 	if (V.loft_kylar) V.loft_spray = 0;
@@ -1872,12 +1872,13 @@ function earSlimeDaily(passageEffects = false) {
 				V.worn.genitals.integrity = clothingData("genitals", V.worn.genitals, "integrity_max");
 			}
 		}
-		if (V.earSlime.forcedCommando && V.earSlime.forcedCommando > 0) {
-			V.earSlime.forcedCommando--;
-		}
 		if (V.earSlime.forcedDressing && V.earSlime.forcedDressing.days > 0) {
 			V.earSlime.forcedDressing.days--;
 		}
 	}
+
+	if (V.earSlime.forcedCommando && V.earSlime.forcedCommando > 0) {
+		V.earSlime.forcedCommando--;
+	}
 }
 DefineMacro("earSlimeDaily", earSlimeDaily);
diff --git a/game/overworld-plains/loc-farm/cottage.twee b/game/overworld-plains/loc-farm/cottage.twee
index 76c639b42d..492b9cfa16 100644
--- a/game/overworld-plains/loc-farm/cottage.twee
+++ b/game/overworld-plains/loc-farm/cottage.twee
@@ -729,6 +729,8 @@ You shove Alex away, harder this time. <<He>> falls from the bed. "Suit yourself
 
 		<<tearful>> you roll over.
 		<br><br>
+		<<clotheson>>
+		<<endcombat>>
 
 		<<link [[Next|Farm Bed]]>><</link>>
 	<</if>>
diff --git a/game/overworld-town/loc-sea/main.twee b/game/overworld-town/loc-sea/main.twee
index 1feeb17ffd..311ca9b80b 100644
--- a/game/overworld-town/loc-sea/main.twee
+++ b/game/overworld-town/loc-sea/main.twee
@@ -144,7 +144,6 @@ You are on the rocks to the west of the beach. Most of them become covered by wa
 <br><br>
 There's a sheltered space atop one of the rocks, above a deep pool.
 <br>
-<<storeactions "beachrocks">>
 <<if $smuggler_location is "beach" and $smuggler_timer is 0 and Time.dayState is "night" and Time.hour gte 18>>
 	<<smugglerdifficultytext>>
 <</if>>
@@ -179,6 +178,7 @@ There's a sheltered space atop one of the rocks, above a deep pool.
 <<if $stress gte $stressmax>>
 	<<passoutbeach>>
 <<else>>
+	<<storeactions "beachrocks">>
 	<<if $smuggler_location is "beach" and $smuggler_timer is 0 and Time.dayState is "night" and Time.hour gte 18>>
 		<<smugglerdifficultyactions>>
 		<br>
diff --git a/game/special-masturbation/actions.js b/game/special-masturbation/actions.js
index 5569ec1955..9ed187837c 100644
--- a/game/special-masturbation/actions.js
+++ b/game/special-masturbation/actions.js
@@ -110,7 +110,7 @@ function masturbationActions() {
 		fragment.append(wikifier("promiscuity1"));
 		V.masturbationorgasmstat++;
 		V.masturbationorgasm++;
-		if (V.femaleclimax !== 1 && V.mouth !== "mpenis") {
+		if (V.femaleclimax !== 1 && !T.deniedOrgasm && V.worn.genitals.name !== "chastity parasite" && V.mouth !== "mpenis") {
 			V.masturbationorgasmsemen++;
 		}
 		fragment.append(wikifier("purity", -1));
-- 
GitLab