From 5be1902a34f013eced07e034a2817b6911ac4579 Mon Sep 17 00:00:00 2001
From: Ace <>
Date: Sat, 3 Jul 2021 22:26:13 -0400
Subject: [PATCH] refactored belts

---
 BondageClub/Assets/Female3DCG/Female3DCG.js   |  8 +-
 .../Assets/Female3DCG/Female3DCGExtended.js   | 40 +++++++++
 .../MetalChastityBelt/MetalChastityBelt.js    | 86 -------------------
 .../OrnateChastityBelt/OrnateChastityBelt.js  |  7 --
 .../PolishedChastityBelt.js                   |  7 --
 .../StuddedChastityBelt.js                    |  7 --
 BondageClub/index.html                        |  4 -
 7 files changed, 44 insertions(+), 115 deletions(-)
 delete mode 100644 BondageClub/Screens/Inventory/ItemPelvis/MetalChastityBelt/MetalChastityBelt.js
 delete mode 100644 BondageClub/Screens/Inventory/ItemPelvis/OrnateChastityBelt/OrnateChastityBelt.js
 delete mode 100644 BondageClub/Screens/Inventory/ItemPelvis/PolishedChastityBelt/PolishedChastityBelt.js
 delete mode 100644 BondageClub/Screens/Inventory/ItemPelvis/StuddedChastityBelt/StuddedChastityBelt.js

diff --git a/BondageClub/Assets/Female3DCG/Female3DCG.js b/BondageClub/Assets/Female3DCG/Female3DCG.js
index e13a544e3b..138810a043 100644
--- a/BondageClub/Assets/Female3DCG/Female3DCG.js
+++ b/BondageClub/Assets/Female3DCG/Female3DCG.js
@@ -1873,9 +1873,9 @@ var AssetFemale3DCG = [
 			{ Name: "StraponPanties", Fetish: ["Latex"], Value: -1, Time: 15, DefaultColor: "#505050", Prerequisite: "AccessVulva", AllowActivity: ["Penetrate"], Bonus: "KidnapBruteForce", HideItem: ["ItemButtAnalBeads2", "ItemVulvaVibratingDildo", "ItemVulvaClitSuctionCup", "ItemVulvaInflatableVibeDildo", "ItemVulvaHeavyWeightClamp", "ItemVulvaPenisDildo", "ItemVulvaShockDildo", "ItemVulvaPiercingsVibeHeartClitPiercing", "ItemVulvaPiercingsClitRing"], Effect: ["Chaste"], Block: ["ItemVulva", "ItemButt", "ItemVulvaPiercings"] },
 			{ Name: "LeatherChastityBelt", Fetish: ["Leather"], Value: 30, Difficulty: 8, Time: 20, RemoveTime: 10, AllowLock: true, Prerequisite: "AccessVulva", HideItem: ["ItemButtAnalBeads2", "ItemVulvaVibratingDildo", "ItemVulvaClitSuctionCup", "ItemVulvaInflatableVibeDildo", "ItemVulvaHeavyWeightClamp", "ItemVulvaPenisDildo", "ItemVulvaShockDildo"], Effect: ["Chaste"], Block: ["ItemVulva", "ItemButt", "ItemVulvaPiercings"], ExpressionTrigger: [{ Name: "Soft", Group: "Eyebrows", Timer: 10 }] },
 			{ Name: "SleekLeatherChastityBelt", Fetish: ["Leather"], Value: 45, Difficulty: 11, Time: 20, RemoveTime: 10, AllowLock: true, Prerequisite: "AccessVulva", HideItem: ["ItemButtAnalBeads2", "ItemVulvaVibratingDildo", "ItemVulvaClitSuctionCup", "ItemVulvaInflatableVibeDildo", "ItemVulvaHeavyWeightClamp", "ItemVulvaPenisDildo", "ItemVulvaShockDildo", "ItemVulvaPiercingsVibeHeartClitPiercing", "ItemVulvaPiercingsClitRing"], Effect: ["Chaste"], Block: ["ItemVulva", "ItemButt", "ItemVulvaPiercings"], ExpressionTrigger: [{ Name: "Soft", Group: "Eyebrows", Timer: 10 }] },
-			{ Name: "StuddedChastityBelt", Fetish: ["Leather", "Metal"], Value: 60, Difficulty: 14, Time: 20, RemoveTime: 10, AllowLock: true, Prerequisite: "AccessVulva", HideItem: ["ItemButtAnalBeads2", "ItemVulvaVibratingDildo", "ItemVulvaClitSuctionCup", "ItemVulvaInflatableVibeDildo", "ItemVulvaHeavyWeightClamp", "ItemVulvaPenisDildo", "ItemVulvaShockDildo", "ItemVulvaPiercingsVibeHeartClitPiercing", "ItemVulvaPiercingsClitRing"], Effect: ["Chaste"], AllowBlock: ["ItemButt"], AllowType: ["ClosedBack"], Block: ["ItemVulva", "ItemVulvaPiercings"], ExpressionTrigger: [{ Name: "Soft", Group: "Eyebrows", Timer: 10 }], Extended: true, HasType: false },
-			{ Name: "MetalChastityBelt", Fetish: ["Metal"], Value: 100, Difficulty: 20, Time: 20, RemoveTime: 10, AllowLock: true, Audio: "CuffsMetal", Prerequisite: "AccessVulva", HideItem: ["ItemButtAnalBeads2", "ItemVulvaVibratingDildo", "ItemVulvaClitSuctionCup", "ItemVulvaInflatableVibeDildo", "ItemVulvaHeavyWeightClamp", "ItemVulvaPenisDildo", "ItemVulvaShockDildo", "ItemVulvaPiercingsVibeHeartClitPiercing", "ItemVulvaPiercingsClitRing"], Effect: ["Chaste"], AllowBlock: ["ItemButt"], AllowType: ["ClosedBack"], Block: ["ItemVulva", "ItemVulvaPiercings"], ExpressionTrigger: [{ Name: "Soft", Group: "Eyebrows", Timer: 10 }], Extended: true, HasType: false },
-			{ Name: "PolishedChastityBelt", Fetish: ["Metal"], Value: 150, Difficulty: 30, Time: 20, RemoveTime: 10, AllowLock: true, Audio: "CuffsMetal", Prerequisite: "AccessVulva", HideItem: ["ItemButtAnalBeads2", "ItemVulvaVibratingDildo", "ItemVulvaClitSuctionCup", "ItemVulvaInflatableVibeDildo", "ItemVulvaHeavyWeightClamp", "ItemVulvaPenisDildo", "ItemVulvaShockDildo", "ItemVulvaPiercingsVibeHeartClitPiercing", "ItemVulvaPiercingsClitRing"], Effect: ["Chaste"], AllowBlock: ["ItemButt"], AllowType: ["ClosedBack"], Block: ["ItemVulva", "ItemVulvaPiercings"], ExpressionTrigger: [{ Name: "Soft", Group: "Eyebrows", Timer: 10 }], Extended: true, HasType: false },
+			{ Name: "StuddedChastityBelt", Fetish: ["Leather", "Metal"], Value: 60, Difficulty: 14, Time: 20, RemoveTime: 10, AllowLock: true, Prerequisite: "AccessVulva", HideItem: ["ItemButtAnalBeads2", "ItemVulvaVibratingDildo", "ItemVulvaClitSuctionCup", "ItemVulvaInflatableVibeDildo", "ItemVulvaHeavyWeightClamp", "ItemVulvaPenisDildo", "ItemVulvaShockDildo", "ItemVulvaPiercingsVibeHeartClitPiercing", "ItemVulvaPiercingsClitRing"], Effect: ["Chaste"], Block: ["ItemVulva", "ItemVulvaPiercings"], ExpressionTrigger: [{ Name: "Soft", Group: "Eyebrows", Timer: 10 }], Extended: true, HasType: false },
+			{ Name: "MetalChastityBelt", Fetish: ["Metal"], Value: 100, Difficulty: 20, Time: 20, RemoveTime: 10, AllowLock: true, Audio: "CuffsMetal", Prerequisite: "AccessVulva", HideItem: ["ItemButtAnalBeads2", "ItemVulvaVibratingDildo", "ItemVulvaClitSuctionCup", "ItemVulvaInflatableVibeDildo", "ItemVulvaHeavyWeightClamp", "ItemVulvaPenisDildo", "ItemVulvaShockDildo", "ItemVulvaPiercingsVibeHeartClitPiercing", "ItemVulvaPiercingsClitRing"], Effect: ["Chaste"], Block: ["ItemVulva", "ItemVulvaPiercings"], ExpressionTrigger: [{ Name: "Soft", Group: "Eyebrows", Timer: 10 }], Extended: true, HasType: false },
+			{ Name: "PolishedChastityBelt", Fetish: ["Metal"], Value: 150, Difficulty: 30, Time: 20, RemoveTime: 10, AllowLock: true, Audio: "CuffsMetal", Prerequisite: "AccessVulva", HideItem: ["ItemButtAnalBeads2", "ItemVulvaVibratingDildo", "ItemVulvaClitSuctionCup", "ItemVulvaInflatableVibeDildo", "ItemVulvaHeavyWeightClamp", "ItemVulvaPenisDildo", "ItemVulvaShockDildo", "ItemVulvaPiercingsVibeHeartClitPiercing", "ItemVulvaPiercingsClitRing"], Effect: ["Chaste"], Block: ["ItemVulva", "ItemVulvaPiercings"], ExpressionTrigger: [{ Name: "Soft", Group: "Eyebrows", Timer: 10 }], Extended: true, HasType: false },
 			{ Name: "FuturisticChastityBelt", Category: ["SciFi"], Fetish: ["Metal"], Value: 170, BuyGroup: "FuturisticChastityBelt", Difficulty: 50, Time: 20, RemoveTime: 10, Random: false, AllowLock: true, DrawLocks: false, DefaultColor: ["#93C48C", "#3B7F2C", "Default", "Default", "Default"], Audio: "FuturisticApply", Prerequisite: "AccessVulva", HideItem: ["ItemButtAnalBeads2", "ItemVulvaVibratingDildo", "ItemVulvaClitSuctionCup", "ItemVulvaInflatableVibeDildo", "ItemVulvaHeavyWeightClamp", "ItemVulvaPenisDildo", "ItemVulvaShockDildo", "ItemVulvaPiercingsVibeHeartClitPiercing", "ItemVulvaPiercingsClitRing"], FuturisticRecolor: true, Effect: [ "Chaste", "UseRemote"], AllowBlock: ["ItemVulvaPiercings", "ItemButt", "ItemVulva"], AllowType: ["ClosedBack1","OpenBoth1", "OpenBack2", "ClosedBack2","OpenBoth2", "OpenBack3", "ClosedBack3","OpenBoth3", "ChatMessage", "PunishOrgasm", "PunishStruggle", "PunishStrugleOther"], Block: [], ExpressionTrigger: [{ Name: "Soft", Group: "Eyebrows", Timer: 10 }], Extended: true, HasType: false, DynamicScriptDraw: true,
 				Layer: [
 					{ Name: "Mesh", AllowColorize: true, AllowTypes: ["", "OpenBoth1", "ClosedBack1"]},
@@ -1918,7 +1918,7 @@ var AssetFemale3DCG = [
 				]
 			},
 			{
-				Name: "OrnateChastityBelt", Fetish: ["Metal"], Value: 200, Difficulty: 50, Time: 20, RemoveTime: 10, AllowLock: true, Audio: "CuffsMetal", Prerequisite: "AccessVulva", HideItem: ["ItemButtAnalBeads2", "ItemVulvaVibratingDildo", "ItemVulvaClitSuctionCup", "ItemVulvaInflatableVibeDildo", "ItemVulvaHeavyWeightClamp", "ItemVulvaPenisDildo", "ItemVulvaShockDildo", "ItemVulvaPiercingsVibeHeartClitPiercing", "ItemVulvaPiercingsClitRing"], Effect: ["Chaste"], AllowBlock: ["ItemButt"], AllowType: ["ClosedBack"], Block: ["ItemVulva", "ItemVulvaPiercings"], ExpressionTrigger: [{ Name: "Soft", Group: "Eyebrows", Timer: 10 }], Extended: true, HasType: false,
+				Name: "OrnateChastityBelt", Fetish: ["Metal"], Value: 200, Difficulty: 50, Time: 20, RemoveTime: 10, AllowLock: true, Audio: "CuffsMetal", Prerequisite: "AccessVulva", HideItem: ["ItemButtAnalBeads2", "ItemVulvaVibratingDildo", "ItemVulvaClitSuctionCup", "ItemVulvaInflatableVibeDildo", "ItemVulvaHeavyWeightClamp", "ItemVulvaPenisDildo", "ItemVulvaShockDildo", "ItemVulvaPiercingsVibeHeartClitPiercing", "ItemVulvaPiercingsClitRing"], Effect: ["Chaste"], Block: ["ItemVulva", "ItemVulvaPiercings"], ExpressionTrigger: [{ Name: "Soft", Group: "Eyebrows", Timer: 10 }], Extended: true, HasType: false,
 				Layer: [
 					{ Name: "Belt" },
 					{ Name: "Gems" }
diff --git a/BondageClub/Assets/Female3DCG/Female3DCGExtended.js b/BondageClub/Assets/Female3DCG/Female3DCGExtended.js
index f5411272d6..f8ae05644b 100644
--- a/BondageClub/Assets/Female3DCG/Female3DCGExtended.js
+++ b/BondageClub/Assets/Female3DCG/Female3DCGExtended.js
@@ -1966,6 +1966,46 @@ var AssetFemale3DCGExtended = {
 				]
 			},
 		}, // SilkStraps
+		MetalChastityBelt: {
+			Archetype: ExtendedArchetype.TYPED,
+			Config: {
+				ChatTags: [CommonChatTags.SOURCE_CHAR, CommonChatTags.DEST_CHAR],
+				Options: [
+					{
+						Name: "OpenBack",
+						Property: {
+							Type: null,
+							Block: null,
+						},
+					},
+					{
+						Name: "ClosedBack",
+						Property: {
+							Type: "ClosedBack",
+							Block: ["ItemButt"],
+						},
+					},
+				],
+				Dialog: {
+					Load: "SelectBackShield",
+					TypePrefix: "Chastity",
+					NpcPrefix: "Chastity",
+					ChatPrefix: "ChastityBeltBackShield",
+				}
+			},
+		}, // MetalChastityBelt
+		OrnateChastityBelt: {
+			Archetype: ExtendedArchetype.TYPED,
+			CopyConfig: { AssetName: "MetalChastityBelt" },
+		}, // OrnateChastityBelt
+		StuddedChastityBelt: {
+			Archetype: ExtendedArchetype.TYPED,
+			CopyConfig: { AssetName: "MetalChastityBelt" },
+		}, // StuddedChastityBelt
+		PolishedChastityBelt: {
+			Archetype: ExtendedArchetype.TYPED,
+			CopyConfig: { AssetName: "MetalChastityBelt" },
+		}, // PolishedChastityBelt
 	}, // ItemPelvis
 	ItemEars: {
 		HeadphoneEarPlugs: {
diff --git a/BondageClub/Screens/Inventory/ItemPelvis/MetalChastityBelt/MetalChastityBelt.js b/BondageClub/Screens/Inventory/ItemPelvis/MetalChastityBelt/MetalChastityBelt.js
deleted file mode 100644
index f09830cbc9..0000000000
--- a/BondageClub/Screens/Inventory/ItemPelvis/MetalChastityBelt/MetalChastityBelt.js
+++ /dev/null
@@ -1,86 +0,0 @@
-"use strict";
-
-var InventoryItemPelvisMetalChastityBeltOptions = [
-	{
-		Name: "OpenBack",
-		Property: {
-			Type: null,
-			Block: null,
-		},
-	},
-	{
-		Name: "ClosedBack",
-		Property: {
-			Type: "ClosedBack",
-			Block: ["ItemButt"],
-		},
-	},
-];
-
-/**
- * Loads the item extension properties
- * @returns {void} - Nothing
- */
-function InventoryItemPelvisMetalChastityBeltLoad() {
-	ExtendedItemLoad(InventoryItemPelvisMetalChastityBeltOptions, "SelectBackShield");
-}
-
-/**
-* Draw the item extension screen
-* @returns {void} - Nothing
-*/
-function InventoryItemPelvisMetalChastityBeltDraw() {
-	ExtendedItemDraw(InventoryItemPelvisMetalChastityBeltOptions, "Chastity");
-}
-
-/**
- * Catches the item extension clicks
- * @returns {void} - Nothing
- */
-function InventoryItemPelvisMetalChastityBeltClick() {
-	ExtendedItemClick(InventoryItemPelvisMetalChastityBeltOptions);
-}
-
-/**
- * Publishes the message to the chat
- * @param {Character} C - The target character
- * @param {Option} Option - The currently selected Option
- * @returns {void} - Nothing
- */
-function InventoryItemPelvisMetalChastityBeltPublishAction(C, Option) {
-	var msg = "ChastityBeltBackShield" + Option.Name;
-	var Dictionary = [
-		{ Tag: "SourceCharacter", Text: Player.Name, MemberNumber: Player.MemberNumber },
-		{ Tag: "DestinationCharacter", Text: C.Name, MemberNumber: C.MemberNumber },
-	];
-	ChatRoomPublishCustomAction(msg, true, Dictionary);
-}
-
-/**
- * Validates, if the chosen option is possible. Sets the global variable 'DialogExtendedMessage' to the appropriate error message, if not.
- * @param {Character} C - The character to validate the option for
- * @param {Item} Item - The equipped item
- * @returns {string} - Returns false and sets DialogExtendedMessage, if the chosen option is not possible.
- */
-function InventoryItemPelvisMetalChastityBeltValidate(C, Item) {
-	var Allowed = "";
-
-	if (Item.Property.LockedBy && !DialogCanUnlock(C, Item)) {
-		Allowed = DialogFindPlayer("CantChangeWhileLocked");
-	}
-
-	return Allowed;
-}
-
-/**
- * The NPC dialog is for what the NPC says to you when you make a change to their restraints - the dialog lookup is on a
- * per-NPC basis. You basically put the "AssetName" + OptionName in there to allow individual NPCs to override their default
- * "GroupName" dialog if for example we ever wanted an NPC to react specifically to having the restraint put on them.
- * That could be done by adding an "AssetName" entry (or entries) to that NPC's dialog CSV
- * @param {Character} C - The NPC to whom the restraint is applied
- * @param {Option} Option - The chosen option for this extended item
- * @returns {void} - Nothing
- */
-function InventoryItemPelvisMetalChastityBeltNpcDialog(C, Option) {
-	C.CurrentDialog = DialogFind(C, "Chastity" + Option.Name, "ItemPelvis");
-}
diff --git a/BondageClub/Screens/Inventory/ItemPelvis/OrnateChastityBelt/OrnateChastityBelt.js b/BondageClub/Screens/Inventory/ItemPelvis/OrnateChastityBelt/OrnateChastityBelt.js
deleted file mode 100644
index 1b85935a34..0000000000
--- a/BondageClub/Screens/Inventory/ItemPelvis/OrnateChastityBelt/OrnateChastityBelt.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-function InventoryItemPelvisOrnateChastityBeltLoad() { InventoryItemPelvisMetalChastityBeltLoad(); }
-function InventoryItemPelvisOrnateChastityBeltDraw() { InventoryItemPelvisMetalChastityBeltDraw(); }
-function InventoryItemPelvisOrnateChastityBeltClick() { InventoryItemPelvisMetalChastityBeltClick(); }
-function InventoryItemPelvisOrnateChastityBeltPublishAction(C, Option) { InventoryItemPelvisMetalChastityBeltPublishAction(C, Option); }
-function InventoryItemPelvisOrnateChastityBeltValidate(C, Item) {  return InventoryItemPelvisMetalChastityBeltValidate(C, Item); }
-function InventoryItemPelvisOrnateChastityBeltNpcDialog(C, Option) { InventoryItemPelvisMetalChastityBeltNpcDialog(C, Option); }
diff --git a/BondageClub/Screens/Inventory/ItemPelvis/PolishedChastityBelt/PolishedChastityBelt.js b/BondageClub/Screens/Inventory/ItemPelvis/PolishedChastityBelt/PolishedChastityBelt.js
deleted file mode 100644
index 2eb33fa586..0000000000
--- a/BondageClub/Screens/Inventory/ItemPelvis/PolishedChastityBelt/PolishedChastityBelt.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-function InventoryItemPelvisPolishedChastityBeltLoad() { InventoryItemPelvisMetalChastityBeltLoad(); }
-function InventoryItemPelvisPolishedChastityBeltDraw() { InventoryItemPelvisMetalChastityBeltDraw(); }
-function InventoryItemPelvisPolishedChastityBeltClick() { InventoryItemPelvisMetalChastityBeltClick(); }
-function InventoryItemPelvisPolishedChastityBeltPublishAction(C, Option) { InventoryItemPelvisMetalChastityBeltPublishAction(C, Option); }
-function InventoryItemPelvisPolishedChastityBeltValidate(C, Item) {  return InventoryItemPelvisMetalChastityBeltValidate(C, Item); }
-function InventoryItemPelvisPolishedChastityBeltNpcDialog(C, Option) { InventoryItemPelvisMetalChastityBeltNpcDialog(C, Option); }
diff --git a/BondageClub/Screens/Inventory/ItemPelvis/StuddedChastityBelt/StuddedChastityBelt.js b/BondageClub/Screens/Inventory/ItemPelvis/StuddedChastityBelt/StuddedChastityBelt.js
deleted file mode 100644
index aeb91a1b36..0000000000
--- a/BondageClub/Screens/Inventory/ItemPelvis/StuddedChastityBelt/StuddedChastityBelt.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-function InventoryItemPelvisStuddedChastityBeltLoad() { InventoryItemPelvisMetalChastityBeltLoad(); }
-function InventoryItemPelvisStuddedChastityBeltDraw() { InventoryItemPelvisMetalChastityBeltDraw(); }
-function InventoryItemPelvisStuddedChastityBeltClick() { InventoryItemPelvisMetalChastityBeltClick(); }
-function InventoryItemPelvisStuddedChastityBeltPublishAction(C, Option) { InventoryItemPelvisMetalChastityBeltPublishAction(C, Option); }
-function InventoryItemPelvisStuddedChastityBeltValidate(C, Item) {  return InventoryItemPelvisMetalChastityBeltValidate(C, Item); }
-function InventoryItemPelvisStuddedChastityBeltNpcDialog(C, Option) { InventoryItemPelvisMetalChastityBeltNpcDialog(C, Option); }
diff --git a/BondageClub/index.html b/BondageClub/index.html
index 710b743695..0be3132b50 100644
--- a/BondageClub/index.html
+++ b/BondageClub/index.html
@@ -239,15 +239,11 @@
 <script src="Screens/Inventory/ItemDevices/SmallLocker/SmallLocker.js"></script>
 <script src="Screens/Inventory/ItemVulva/ClitAndDildoVibratorbelt/ClitAndDildoVibratorbelt.js"></script>
 <script src="Screens/Inventory/ItemFeet/SpreaderVibratingDildoBar/SpreaderVibratingDildoBar.js"></script>
-<script src="Screens/Inventory/ItemPelvis/MetalChastityBelt/MetalChastityBelt.js"></script>
-<script src="Screens/Inventory/ItemPelvis/PolishedChastityBelt/PolishedChastityBelt.js"></script>
 <script src="Screens/Inventory/ItemPelvis/FuturisticChastityBelt/FuturisticChastityBelt.js"></script>
 <script src="Screens/Inventory/ItemPelvis/FuturisticTrainingBelt/FuturisticTrainingBelt.js"></script>
 <script src="Screens/Inventory/ItemPelvis/SciFiPleasurePanties/SciFiPleasurePanties.js"></script>
 <script src="Screens/Inventory/ItemBreast/FuturisticBra/FuturisticBra.js"></script>
 <script src="Screens/Inventory/ItemBreast/FuturisticBra2/FuturisticBra2.js"></script>
-<script src="Screens/Inventory/ItemPelvis/OrnateChastityBelt/OrnateChastityBelt.js"></script>
-<script src="Screens/Inventory/ItemPelvis/StuddedChastityBelt/StuddedChastityBelt.js"></script>
 <script src="Screens/Inventory/ItemPelvis/HempRope/HempRope.js"></script>
 <script src="Screens/Inventory/ItemBoots/FuturisticHeels/FuturisticHeels.js"></script>
 <script src="Screens/Inventory/ItemBoots/FuturisticHeels2/FuturisticHeels2.js"></script>
-- 
GitLab