dev.8
* R93 * /do fix
This commit is contained in:
parent
2bf6695af0
commit
e4f7ce0560
|
@ -1,6 +1,6 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name MBCHC
|
// @name MBCHC
|
||||||
// @version dev.7
|
// @version dev.8
|
||||||
// @description Mute's Bondage Club Hacks Collection
|
// @description Mute's Bondage Club Hacks Collection
|
||||||
// @author codename.mute@proton.me
|
// @author codename.mute@proton.me
|
||||||
// @namespace https://code.fleshless.org/mute/
|
// @namespace https://code.fleshless.org/mute/
|
||||||
|
@ -21,8 +21,8 @@
|
||||||
if (!window.AsylumGGTSSAddItems) throw "AsylumGGTSSAddItems() not found, aborting MBCHC loading"
|
if (!window.AsylumGGTSSAddItems) throw "AsylumGGTSSAddItems() not found, aborting MBCHC loading"
|
||||||
if (window.MBCHC) throw "MBCHC found, aborting loading"
|
if (window.MBCHC) throw "MBCHC found, aborting loading"
|
||||||
window.MBCHC = {
|
window.MBCHC = {
|
||||||
VERSION: "dev.7",
|
VERSION: "dev.8",
|
||||||
TARGET_VERSION: "R86",
|
TARGET_VERSION: "R93",
|
||||||
NEXT_MESSAGE: 1,
|
NEXT_MESSAGE: 1,
|
||||||
LOG_MESSAGES: false,
|
LOG_MESSAGES: false,
|
||||||
RETHROW: false,
|
RETHROW: false,
|
||||||
|
@ -287,10 +287,8 @@ window.MBCHC = {
|
||||||
if ((activity.Name || activity.Activity.Name).endsWith("Item")) {
|
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)))
|
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)
|
window.DialogPublishAction(char, item)
|
||||||
} else window.ActivityRun(char, activity)
|
} else window.ActivityRun(window.Player, char, char.FocusGroup, activity)
|
||||||
} finally {
|
} finally {char.FocusGroup = null} },
|
||||||
char.FocusGroup = null
|
|
||||||
} },
|
|
||||||
replace_me: function(match, offset, string) {
|
replace_me: function(match, offset, string) {
|
||||||
let text = string.slice(1)
|
let text = string.slice(1)
|
||||||
let suffix = " "
|
let suffix = " "
|
||||||
|
@ -359,7 +357,7 @@ window.MBCHC = {
|
||||||
/* (["anim", "pose"]).forEach(tag => {let cmd = window.Commands.find(c => tag === c.Tag); if (cmd) cmd.AutoComplete = this[`complete_fbc_${tag}`]}) */ // this line explodes, don't ask me why
|
/* (["anim", "pose"]).forEach(tag => {let cmd = window.Commands.find(c => tag === c.Tag); if (cmd) cmd.AutoComplete = this[`complete_fbc_${tag}`]}) */ // this line explodes, don't ask me why
|
||||||
let cmd = window.Commands.find(c => "anim" === c.Tag)
|
let cmd = window.Commands.find(c => "anim" === c.Tag)
|
||||||
if (cmd) cmd.AutoComplete = this.complete_fbc_anim
|
if (cmd) cmd.AutoComplete = this.complete_fbc_anim
|
||||||
cmd = window.Commands.find(c => "pose" === c.Tag)
|
cmd = window.Commands.find(c => "pose" === c.Tag)
|
||||||
if (cmd) cmd.AutoComplete = this.complete_fbc_pose
|
if (cmd) cmd.AutoComplete = this.complete_fbc_pose
|
||||||
},
|
},
|
||||||
gather_versions: function() { return(window.ChatRoomCharacter.filter(c => c.MBCHC).map(c => ({name: c.dn, cid: c.cid, version: c.MBCHC.VERSION}))) },
|
gather_versions: function() { return(window.ChatRoomCharacter.filter(c => c.MBCHC).map(c => ({name: c.dn, cid: c.cid, version: c.MBCHC.VERSION}))) },
|
||||||
|
@ -588,9 +586,9 @@ window.MBCHC = {
|
||||||
this.before("ChatRoomSendChat", () => {
|
this.before("ChatRoomSendChat", () => {
|
||||||
let input = window.ElementValue("InputChat")
|
let input = window.ElementValue("InputChat")
|
||||||
if (!input.startsWith("@@@") && input.startsWith("@")) {
|
if (!input.startsWith("@@@") && input.startsWith("@")) {
|
||||||
input = input.replace(this.RE_PREF_ACTIVITY, this.PREF_ACTIVITY)
|
input = input.replace(this.RE_PREF_ACTIVITY, this.PREF_ACTIVITY)
|
||||||
input = input.replace(this.RE_PREF_ACTIVITY_ME, this.replace_me)
|
input = input.replace(this.RE_PREF_ACTIVITY_ME, this.replace_me)
|
||||||
window.ElementValue("InputChat", input)
|
window.ElementValue("InputChat", input)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.after("ChatRoomSendChat", () => {
|
this.after("ChatRoomSendChat", () => {
|
||||||
|
@ -632,13 +630,11 @@ window.MBCHC = {
|
||||||
})
|
})
|
||||||
|
|
||||||
// Chat room handlers
|
// Chat room handlers
|
||||||
window.ChatRoomRegisterMessageHandler({ Priority: -220, Description: "MBCHC preprocessor",
|
window.ChatRoomRegisterMessageHandler({ Priority: -220, Description: "MBCHC preprocessor", Callback: (data, sender, msg, metadata) => {
|
||||||
Callback: (data, sender, msg, metadata) => {
|
data.MBCHC_ID = this.NEXT_MESSAGE
|
||||||
data.MBCHC_ID = this.NEXT_MESSAGE
|
this.NEXT_MESSAGE += 1
|
||||||
this.NEXT_MESSAGE += 1
|
if (this.LOG_MESSAGES) console.debug({data, sender, msg, metadata})
|
||||||
if (this.LOG_MESSAGES) console.debug({data, sender, msg, metadata})
|
}})
|
||||||
}
|
|
||||||
})
|
|
||||||
window.ChatRoomRegisterMessageHandler({ Priority: -219, Description: "MBCHC room enter hook",
|
window.ChatRoomRegisterMessageHandler({ Priority: -219, Description: "MBCHC room enter hook",
|
||||||
Callback: (data, sender, msg, metadata) => { if (("Action" === data.Type) && ("ServerEnter" === data.Content) && (data.Sender === window.Player.cid)) this.player_enters_room() }
|
Callback: (data, sender, msg, metadata) => { if (("Action" === data.Type) && ("ServerEnter" === data.Content) && (data.Sender === window.Player.cid)) this.player_enters_room() }
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user