From bed6cbf475f0b96c14978abbdb0b55f261ac6413 Mon Sep 17 00:00:00 2001 From: mute Date: Tue, 28 Jun 2022 20:56:04 +0000 Subject: [PATCH] bugfix: BCX commands didn't work anymore also SDK registration to be polite, I don't really use it --- mbchc-dev.user.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mbchc-dev.user.js b/mbchc-dev.user.js index 5543a4d..af5cb53 100644 --- a/mbchc-dev.user.js +++ b/mbchc-dev.user.js @@ -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)) }