From a30dcbd18269bfe222fc5076c46062ed7236b05f Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Emmanuel Zorg <zorgjeanbe@proton.me>
Date: Fri, 28 Mar 2025 17:36:27 +0100
Subject: [PATCH 1/3] Use CopyConfig to make the Bartender vest duplicates

---
 BondageClub/Assets/Female3DCG/Female3DCG.js | 198 ++++----------------
 1 file changed, 41 insertions(+), 157 deletions(-)

diff --git a/BondageClub/Assets/Female3DCG/Female3DCG.js b/BondageClub/Assets/Female3DCG/Female3DCG.js
index 6a1b6a89fb..ed31c27c56 100644
--- a/BondageClub/Assets/Female3DCG/Female3DCG.js
+++ b/BondageClub/Assets/Female3DCG/Female3DCG.js
@@ -1065,65 +1065,24 @@ var AssetFemale3DCG = [
 			},
 			{
 				Name: "BartenderVest",
-				InventoryID: 1225,
-				Value: -1,
-				BuyGroup: "BartenderVest",
-				ParentItem: "SuitBartenderVest",
-				DynamicGroupName: "Suit",
-				Gender: "F",
-				Prerequisite: ["HasBreasts"],
-				Priority: 27,
-				Top: 182,
-				Left: 125,
-				DefaultColor: ["#893939", "#897E66"],
-				PoseMapping: {
-					...AssetPoseMapping.Cloth
+				CopyConfig: {
+					GroupName: "Suit",
+					AssetName: "BartenderVest",
+					BuyGroup: true,
 				},
-				Layer: [
-					{
-						Name: "Vest",
-						PoseMapping: {
-							BackBoxTie: "BackBoxTie",
-							BackCuffs: "BackBoxTie",
-							BackElbowTouch: "BackBoxTie",
-							OverTheHead: "OverTheHead",
-							TapedHands: "BackBoxTie",
-							Yoked: "Yoked",
-							AllFours: "AllFours",
-							Hogtied: "Hogtied",
-						},
-						AllowColorize: true,
-					},
-					{
-						Name: "Buttons",
-						ParentGroup: {},
-						PoseMapping: {
-							BackBoxTie: "BackBoxTie",
-							BackCuffs: "BackBoxTie",
-							BackElbowTouch: "BackBoxTie",
-							OverTheHead: "OverTheHead",
-							TapedHands: "BackBoxTie",
-							Yoked: "Yoked",
-							AllFours: PoseType.HIDE,
-							Hogtied: PoseType.HIDE,
-						},
-						AllowColorize: true,
-					},
-					{
-						Name: "BHog",
-						PoseMapping: {
-							BackBoxTie: PoseType.HIDE,
-							BackCuffs: PoseType.HIDE,
-							BackElbowTouch: PoseType.HIDE,
-							OverTheHead: PoseType.HIDE,
-							TapedHands: PoseType.HIDE,
-							Yoked: PoseType.HIDE,
-							AllFours: "Hogtied",
-							Hogtied: "Hogtied",
-						},
-						CopyLayerColor: "Buttons",
-					},
-				],
+				Value: -1,
+				DynamicGroupName: "Suit",
+			},
+			{
+				Name: "BartenderVestM",
+				CopyConfig: {
+					GroupName: "Suit",
+					AssetName: "BartenderVestM",
+					BuyGroup: true,
+				},
+				Value: -1,
+				DynamicGroupName: "Suit",
+				Priority: 27,
 			},
 			{
 				Name: "TennisShirt1",
@@ -3759,69 +3718,6 @@ var AssetFemale3DCG = [
 					{ Name: "Buttons", AllowColorize: true },
 				],
 			},
-			{
-				Name: "BartenderVestM",
-				InventoryID: 1225,
-				Value: -1,
-				BuyGroup: "BartenderVest",
-				ParentItem: "SuitBartenderVestM",
-				DynamicGroupName: "Suit",
-				Gender: "M",
-				Prerequisite: ["HasFlatChest"],
-				Priority: 27,
-				Top: 182,
-				Left: 125,
-				DefaultColor: ["#606060", "Default"],
-				PoseMapping: {
-					...AssetPoseMapping.Cloth
-				},
-				Layer: [
-					{
-						Name: "Vest",
-						PoseMapping: {
-							BackBoxTie: "BackBoxTie",
-							BackCuffs: "BackBoxTie",
-							BackElbowTouch: "BackBoxTie",
-							OverTheHead: "OverTheHead",
-							TapedHands: "BackBoxTie",
-							Yoked: "Yoked",
-							AllFours: "AllFours",
-							Hogtied: "Hogtied",
-						},
-						AllowColorize: true,
-					},
-					{
-						Name: "Buttons",
-						ParentGroup: {},
-						PoseMapping: {
-							BackBoxTie: "BackBoxTie",
-							BackCuffs: "BackBoxTie",
-							BackElbowTouch: "BackBoxTie",
-							OverTheHead: "OverTheHead",
-							TapedHands: "BackBoxTie",
-							Yoked: "BackBoxTie",
-							AllFours: PoseType.HIDE,
-							Hogtied: PoseType.HIDE,
-						},
-						AllowColorize: true,
-					},
-					{
-						Name: "BHog",
-						ParentGroup: {},
-						PoseMapping: {
-							BackBoxTie: PoseType.HIDE,
-							BackCuffs: PoseType.HIDE,
-							BackElbowTouch: PoseType.HIDE,
-							OverTheHead: PoseType.HIDE,
-							TapedHands: PoseType.HIDE,
-							Yoked: PoseType.HIDE,
-							AllFours: "Hogtied",
-							Hogtied: "Hogtied",
-						},
-						CopyLayerColor: "Buttons",
-					},
-				],
-			},
 		],
 		Color: [
 			"Default",
@@ -5437,8 +5333,6 @@ var AssetFemale3DCG = [
 				InventoryID: 1225,
 				Value: 12,
 				BuyGroup: "BartenderVest",
-				ParentItem: "SuitBartenderVest",
-				DynamicGroupName: "Suit",
 				Gender: "F",
 				Prerequisite: ["HasBreasts"],
 				Priority: 29,
@@ -5446,33 +5340,26 @@ var AssetFemale3DCG = [
 				Left: 125,
 				DefaultColor: ["#893939", "#897E66"],
 				PoseMapping: {
-					...AssetPoseMapping.Cloth
+					...AssetPoseMapping.Cloth,
+					BackBoxTie: "BackBoxTie",
+					BackCuffs: "BackBoxTie",
+					BackElbowTouch: "BackBoxTie",
+					OverTheHead: "OverTheHead",
+					TapedHands: "BackBoxTie",
+					Yoked: "Yoked",
+					AllFours: "AllFours",
+					Hogtied: "Hogtied",
 				},
+				InheritPoseMappingFields: true,
 				Layer: [
 					{
 						Name: "Vest",
-						PoseMapping: {
-							BackBoxTie: "BackBoxTie",
-							BackCuffs: "BackBoxTie",
-							BackElbowTouch: "BackBoxTie",
-							OverTheHead: "OverTheHead",
-							TapedHands: "BackBoxTie",
-							Yoked: "Yoked",
-							AllFours: "AllFours",
-							Hogtied: "Hogtied",
-						},
 						AllowColorize: true,
 					},
 					{
 						Name: "Buttons",
 						ParentGroup: {},
 						PoseMapping: {
-							BackBoxTie: "BackBoxTie",
-							BackCuffs: "BackBoxTie",
-							BackElbowTouch: "BackBoxTie",
-							OverTheHead: "OverTheHead",
-							TapedHands: "BackBoxTie",
-							Yoked: "Yoked",
 							AllFours: PoseType.HIDE,
 							Hogtied: PoseType.HIDE,
 						},
@@ -5481,6 +5368,8 @@ var AssetFemale3DCG = [
 					{
 						Name: "BHog",
 						PoseMapping: {
+							BaseLower: PoseType.HIDE,
+							BaseUpper: PoseType.HIDE,
 							BackBoxTie: PoseType.HIDE,
 							BackCuffs: PoseType.HIDE,
 							BackElbowTouch: PoseType.HIDE,
@@ -5536,33 +5425,26 @@ var AssetFemale3DCG = [
 				Left: 125,
 				DefaultColor: ["#606060", "Default"],
 				PoseMapping: {
-					...AssetPoseMapping.Cloth
+					...AssetPoseMapping.Cloth,
+					BackBoxTie: "BackBoxTie",
+					BackCuffs: "BackBoxTie",
+					BackElbowTouch: "BackBoxTie",
+					OverTheHead: "OverTheHead",
+					TapedHands: "BackBoxTie",
+					Yoked: "Yoked",
+					AllFours: "AllFours",
+					Hogtied: "Hogtied",
 				},
+				InheritPoseMappingFields: true,
 				Layer: [
 					{
 						Name: "Vest",
-						PoseMapping: {
-							BackBoxTie: "BackBoxTie",
-							BackCuffs: "BackBoxTie",
-							BackElbowTouch: "BackBoxTie",
-							OverTheHead: "OverTheHead",
-							TapedHands: "BackBoxTie",
-							Yoked: "Yoked",
-							AllFours: "AllFours",
-							Hogtied: "Hogtied",
-						},
 						AllowColorize: true,
 					},
 					{
 						Name: "Buttons",
 						ParentGroup: {},
 						PoseMapping: {
-							BackBoxTie: "BackBoxTie",
-							BackCuffs: "BackBoxTie",
-							BackElbowTouch: "BackBoxTie",
-							OverTheHead: "OverTheHead",
-							TapedHands: "BackBoxTie",
-							Yoked: "BackBoxTie",
 							AllFours: PoseType.HIDE,
 							Hogtied: PoseType.HIDE,
 						},
@@ -5572,6 +5454,8 @@ var AssetFemale3DCG = [
 						Name: "BHog",
 						ParentGroup: {},
 						PoseMapping: {
+							BaseLower: PoseType.HIDE,
+							BaseUpper: PoseType.HIDE,
 							BackBoxTie: PoseType.HIDE,
 							BackCuffs: PoseType.HIDE,
 							BackElbowTouch: PoseType.HIDE,

From a3efd25c79d917163b9ad9c4d7ab1d436bfadcec Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Emmanuel Zorg <zorgjeanbe@proton.me>
Date: Fri, 28 Mar 2025 17:36:39 +0100
Subject: [PATCH 2/3] Fix whitespace

---
 BondageClub/Assets/Female3DCG/Female3DCG.js   | 36 +++++--------------
 .../Assets/Female3DCG/Female3DCGExtended.js   | 10 +++---
 BondageClub/Scripts/Typedef.d.ts              |  2 +-
 3 files changed, 15 insertions(+), 33 deletions(-)

diff --git a/BondageClub/Assets/Female3DCG/Female3DCG.js b/BondageClub/Assets/Female3DCG/Female3DCG.js
index ed31c27c56..0594e10fa0 100644
--- a/BondageClub/Assets/Female3DCG/Female3DCG.js
+++ b/BondageClub/Assets/Female3DCG/Female3DCG.js
@@ -10745,12 +10745,12 @@ var AssetFemale3DCG = [
 				Left: 75,
 				Random: true,
 				Extended: true,
-				DefaultColor: ["#F2AADC","#F2AADC"],
+				DefaultColor: ["#F2AADC", "#F2AADC"],
 				PoseMapping: {
-							...AssetPoseMapping.Garters,
-							Hogtied: PoseType.HIDE,
-							AllFours: PoseType.HIDE,
-						},
+					...AssetPoseMapping.Garters,
+					Hogtied: PoseType.HIDE,
+					AllFours: PoseType.HIDE,
+				},
 				Layer: [
 					{
 						Name: "GarterR",
@@ -28234,13 +28234,7 @@ var AssetFemale3DCG = [
 				AllowTighten: true,
 				DrawLocks: false,
 				Audio: "MetalClose",
-				DefaultColor: [
-					"#AAB7B9",
-					"#707070",
-					"#AAB7B9",
-					"#AAB7B9",
-					"#A89B80",
-				],
+				DefaultColor: ["#AAB7B9", "#707070", "#AAB7B9", "#AAB7B9", "#A89B80"],
 				Layer: [
 					{
 						Name: "Belt",
@@ -29317,13 +29311,7 @@ var AssetFemale3DCG = [
 				AllowTighten: true,
 				DrawLocks: false,
 				Audio: "MetalClose",
-				DefaultColor: [
-					"#AAB7B9",
-					"#707070",
-					"#AAB7B9",
-					"#AAB7B9",
-					"#A89B80",
-				],
+				DefaultColor: ["#AAB7B9", "#707070", "#AAB7B9", "#AAB7B9", "#A89B80"],
 				Layer: [
 					{
 						Name: "Belt",
@@ -34739,13 +34727,7 @@ var AssetFemale3DCG = [
 				AllowTighten: true,
 				DrawLocks: false,
 				Audio: "MetalClose",
-				DefaultColor: [
-					"#AAB7B9",
-					"#707070",
-					"#AAB7B9",
-					"#AAB7B9",
-					"#A89B80",
-				],
+				DefaultColor: ["#AAB7B9", "#707070", "#AAB7B9", "#AAB7B9", "#A89B80"],
 				Layer: [
 					{
 						Name: "Belt",
@@ -51513,7 +51495,7 @@ var AssetFemale3DCG = [
 				AllowLock: true,
 				DrawLocks: false,
 				Extended: true,
-				Audio: "MetalClose", 
+				Audio: "MetalClose",
 				DefaultColor: ["#808D90", "#819F9F", "#8E8D89", "#808D90", "#877C66"],
 				Hide: ["Glasses", "Jewelry"],
 				Block: [
diff --git a/BondageClub/Assets/Female3DCG/Female3DCGExtended.js b/BondageClub/Assets/Female3DCG/Female3DCGExtended.js
index 2c755c7810..150abfee5c 100644
--- a/BondageClub/Assets/Female3DCG/Female3DCGExtended.js
+++ b/BondageClub/Assets/Female3DCG/Female3DCGExtended.js
@@ -4663,9 +4663,9 @@ var AssetFemale3DCGExtended = {
 					Name: "Handcuffs",
 					Key: "h",
 					Options: [
-						{ 
+						{
 							// None
-							Property: {}
+							Property: {},
 						},
 						{
 							// Front
@@ -9737,7 +9737,7 @@ var AssetFemale3DCGExtended = {
 						},
 						{
 							// Neck cuff
-							Property: {Difficulty: 30},
+							Property: { Difficulty: 30 },
 						},
 					],
 				},
@@ -12777,9 +12777,9 @@ var AssetFemale3DCGExtended = {
 					Name: "Handcuffs",
 					Key: "h",
 					Options: [
-						{ 
+						{
 							// None
-							Property: {}
+							Property: {},
 						},
 						{
 							// Front
diff --git a/BondageClub/Scripts/Typedef.d.ts b/BondageClub/Scripts/Typedef.d.ts
index 524a759954..e05ff62f18 100644
--- a/BondageClub/Scripts/Typedef.d.ts
+++ b/BondageClub/Scripts/Typedef.d.ts
@@ -4386,7 +4386,7 @@ interface PreferenceExtensionsSettingItem {
 	 * Called when the extension screen is about to exit.
 	 *
 	 * Happens either through a click of the exit button, or the ESC key.
-	 * This will **not** be called if a disconnect happens, so clean up should be 
+	 * This will **not** be called if a disconnect happens, so clean up should be
 	 * done in {@link PreferenceExtensionsSettingItem.unload}.
 	 *
 	 * @returns {boolean | void} If you have some validation that needs to happen

From 351c0e4394668f3e41f04fa9ea1f68a60210f522 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Emmanuel Zorg <zorgjeanbe@proton.me>
Date: Sun, 30 Mar 2025 23:49:49 +0200
Subject: [PATCH 3/3] Fix an error on reassigning window.location; use reload()
 instead

---
 BondageClub/Screens/Character/Relog/Relog.js            | 3 +--
 BondageClub/Screens/Room/AsylumBedroom/AsylumBedroom.js | 5 +++--
 BondageClub/Screens/Room/MainHall/MainHall.js           | 3 +--
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/BondageClub/Screens/Character/Relog/Relog.js b/BondageClub/Screens/Character/Relog/Relog.js
index ea633f3cfc..67494d25bc 100644
--- a/BondageClub/Screens/Character/Relog/Relog.js
+++ b/BondageClub/Screens/Character/Relog/Relog.js
@@ -107,6 +107,5 @@ function RelogKeyDown(event) {
  * @type {ScreenFunctions["Exit"]}
  */
 function RelogExit() {
-	// eslint-disable-next-line no-self-assign
-	window.location = window.location;
+	window.location.reload();
 }
diff --git a/BondageClub/Screens/Room/AsylumBedroom/AsylumBedroom.js b/BondageClub/Screens/Room/AsylumBedroom/AsylumBedroom.js
index 76e5870c34..86483d26a6 100644
--- a/BondageClub/Screens/Room/AsylumBedroom/AsylumBedroom.js
+++ b/BondageClub/Screens/Room/AsylumBedroom/AsylumBedroom.js
@@ -46,6 +46,7 @@ function AsylumBedroomClick() {
 	if (MouseIn(750, 0, 500, 1000)) CharacterSetCurrent(Player);
 	if (MouseIn(1885, 25, 90, 90) && (LogValue("Isolated", "Asylum") < CurrentTime) && Player.CanWalk()) CommonSetScreen("Room", "AsylumEntrance");
 	if (MouseIn(1885, 145, 90, 90)) InformationSheetLoadCharacter(Player);
-	// eslint-disable-next-line no-self-assign
-	if (MouseIn(1885, 265, 90, 90) && ((LogValue("Committed", "Asylum") >= CurrentTime) || (LogValue("Isolated", "Asylum") >= CurrentTime))) window.location = window.location;
+	if (MouseIn(1885, 265, 90, 90) && ((LogValue("Committed", "Asylum") >= CurrentTime) || (LogValue("Isolated", "Asylum") >= CurrentTime))) {
+		window.location.reload();
+	}
 }
diff --git a/BondageClub/Screens/Room/MainHall/MainHall.js b/BondageClub/Screens/Room/MainHall/MainHall.js
index ed4b62db5e..e0939070ec 100644
--- a/BondageClub/Screens/Room/MainHall/MainHall.js
+++ b/BondageClub/Screens/Room/MainHall/MainHall.js
@@ -463,8 +463,7 @@ function MainHallClick() {
 	if ((MouseX >= 1885) && (MouseX < 1975) && (MouseY >= 25) && (MouseY < 115)) {
 		if (window.confirm(TextGet("ExitConfirm"))) {
 			ServerAccountUpdate.SyncToServer();
-			// eslint-disable-next-line no-self-assign
-			window.location = window.location;
+			window.location.reload();
 		}
 	}