From 3a97857fc17179ac43105a2a06b6b437a613bb1b Mon Sep 17 00:00:00 2001 From: Mute Date: Fri, 11 Nov 2022 00:03:09 +0000 Subject: [PATCH] more beta fixes, removed the penetration patch for now --- mbchc-local.user.js | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/mbchc-local.user.js b/mbchc-local.user.js index 046aa49..7cffcbe 100644 --- a/mbchc-local.user.js +++ b/mbchc-local.user.js @@ -48,7 +48,6 @@ RGB_MUTE: "#6c2132", RGB_POLLY: "#81b1e7", UTC_OFFSET: new Date().getTimezoneOffset() * 60 * 1000, - HAND_PENETRATORS: ["Flogger", "Whip", "TennisRacket", "Gavel", "SmallVibratingWand", "LargeDildo", "Vibrator", "Hairbrush", "SmallDildo", "Baguette", "Spatula", "Broom"], HIDE_SPECIAL: ["Activity","Emoticon"], HIDE_BODY: ["Blush","BodyLower","BodyUpper","Eyebrows","Eyes","Eyes2","Face","Fluids","HairBack","HairFront","Hands","Head","LeftHand","Mouth","Nipples","Pussy","RightHand"], HIDE_CLOTHES: [ @@ -289,9 +288,9 @@ if (!window.ActivityAllowed()) throw "activities disabled in this room" if (!window.ServerChatRoomGetAllowItem(window.Player, char)) throw "no permissions" char.FocusGroup = this.ensure("invalid AssetGroup", () => window.AssetGroupGet(char.AssetFamily, ag)) - let activity = this.ensure("invalid activity", () => window.ActivityAllowedForGroup(char, char.FocusGroup.Name, true).find(a => a.Name === action)) - if (activity.Name.endsWith("Item")) { - const item = this.ensure("no toy found", () => window.Player.Inventory.find(i => i.Asset?.Name === "SpankingToys" && i.Asset.Group?.Name === char.FocusGroup.Name && window.AssetSpankingToys.DynamicActivity(char) === activity.Name)) + let activity = this.ensure("invalid activity", () => window.ActivityAllowedForGroup(char, char.FocusGroup.Name, true).find(a => a.Name === action || a.Activity.Name === action)) + if ((activity.Name || activity.Activity.Name).endsWith("Item")) { + const item = this.ensure("no toy found", () => window.Player.Inventory.find(i => i.Asset?.Name === "SpankingToys" && i.Asset.Group?.Name === char.FocusGroup.Name && window.AssetSpankingToys.DynamicActivity(char) === (activity.Name || activity.Activity.Name))) window.DialogPublishAction(char, item) } else window.ActivityRun(char, activity) } finally { @@ -350,16 +349,6 @@ window.TitleSet(title) //window.TitleList.push({Name: title, Requirement: () => true}) // check for existing first }, - patch_handheld: function() { -// let options = InventoryItemHandsSpankingToysOptions /* eslint-disable-line no-undef */ // window.InventoryItemHandsSpankingToysOptions is undefined -// for (let name of this.HAND_PENETRATORS) { -// let option = options.find(o => o.Name === name) -// if (option && option.Property) { -// if (!option.Property.AllowActivity) option.Property.AllowActivity = [] -// if (option.Property.AllowActivity.indexOf("PenetrateItem") < 0) option.Property.AllowActivity.push("PenetrateItem") -// } -// } - }, copy_fbc_trigger: function(trigger) { let result = { Type: "Action", @@ -435,9 +424,9 @@ let type = char.IsPlayer() ? "self" : "others" let available = window.ActivityAllowedForGroup(char, ag) let toy = window.InventoryGet(window.Player, "ItemHands") - if (toy && toy.Asset.Name === "SpankingToys") available.push(window.AssetAllActivities(char.AssetFamily).find(a => a.Name === window.InventorySpankingToysGetActivity(window.Player))) + if (toy && toy.Asset.Name === "SpankingToys") available.push(window.AssetAllActivities(char.AssetFamily).find(a => a.Name === window.InventorySpankingToysGetActivity?.(window.Player))) let actions = mbchc.ensure(`zone "${zone}" invalid for ("${verb}" "${type}")`, () => types[type]) - let action = mbchc.ensure(`invalid action (${verb} ${zone} ${target})`, () => actions.find(name => available.find(a => a.Name === name))) + let action = mbchc.ensure(`invalid action (${verb} ${zone} ${target})`, () => actions.find(name => available.find(a => a.Name === name || a.Activity.Name === name))) mbchc.run_activity(char, ag, action) } catch (x) { mbchc.report(x) } }, bell: function() { @@ -582,7 +571,6 @@ document.head.appendChild(css) // Actions this.calculate_maps() - this.patch_handheld() window.Player.MBCHC = {VERSION: this.VERSION} window.CommandCombine(COMMANDS) this.LOADED = true