bugfix: BCX commands didn't work anymore

also SDK registration to be polite, I don't really use it
This commit is contained in:
Mute 2022-06-28 20:56:04 +00:00
parent 0d9e284d44
commit bed6cbf475

View File

@ -134,16 +134,19 @@
if (lower) rest = rest.toLocaleLowerCase()
return(first + rest)
},
orig_AsylumGGTSSAddItems: window.AsylumGGTSSAddItems,
orig_ChatRoomMessageInvolvesPlayer: window.ChatRoomMessageInvolvesPlayer,
orig_ChatRoomReceiveSuitcaseMoney: window.ChatRoomReceiveSuitcaseMoney,
orig_ChatRoomSendChat: window.ChatRoomSendChat,
// we need this one here, this is our main loading hook
orig_AsylumGGTSSAddItems: window.AsylumGGTSSAddItems,
} // MBCHC
// Loader
window.AsylumGGTSSAddItems = function() {
if (!window.MBCHC.LOADED) {
// Save originals hopefully after patching
window.MBCHC.orig_ChatRoomMessageInvolvesPlayer = window.ChatRoomMessageInvolvesPlayer
window.MBCHC.orig_ChatRoomReceiveSuitcaseMoney = window.ChatRoomReceiveSuitcaseMoney
window.MBCHC.orig_ChatRoomSendChat = window.ChatRoomSendChat
// Functions
window.MBCHC.HIDE_ALL = window.MBCHC.HIDE_SPECIAL.concat(window.MBCHC.HIDE_BODY).concat(window.MBCHC.HIDE_CLOTHES).concat(window.MBCHC.HIDE_ITEMS)
window.MBCHC.make_my_anal_hook_hide_body = function() {
@ -236,6 +239,7 @@
// Actions
window.CommandCombine(window.MBCHC.COMMANDS)
if (window.bcModSdk) window.bcModSdk.registerMod("MBCHC", window.MBCHC.VERSION)
window.MBCHC.LOADED = true
console.info(window.MBCHC.log("loaded version " + window.MBCHC.VERSION))
}