Update 'mbchc-local.user.js'

patch by Lyra, fixes `/do item` behaviour
This commit is contained in:
Mute 2022-11-03 18:17:20 +00:00
parent d43e3cdeed
commit 634eddbd2a

View File

@ -11,6 +11,8 @@
// @match https://www.bondageprojects.elementfx.com/R*
// @match https://bondage-europe.com/R*
// @match https://www.bondage-europe.com/R*
// @match http://localhost:*/*
// @match http://127.0.0.1:*/*
// @grant none
// ==/UserScript==
@ -289,8 +291,8 @@
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")) {
let item = this.ensure("no toy found", () => window.Player.Inventory.find(i => (i.Asset != null) && (i.Asset.Group.Name == char.FocusGroup.Name) && i.Asset.DynamicAllowInventoryAdd(char)))
window.DialogPublishAction(char, window.DialogInventoryCreateItem(char, item, false))
const item = this.ensure("no toy found", () => window.Player.Appearance.find(i.Asset?.Name === "SpankingToys" && window.AssetSpankingToys.DynamicActivity(char) === activity.Name))
window.DialogPublishAction(char, item)
} else window.ActivityRun(char, activity)
} finally {
char.FocusGroup = null