Update 'mbchc-local.user.js'
This commit is contained in:
		@@ -272,6 +272,11 @@ var bcModSdk=function(){"use strict";const o="1.0.2";function e(o){alert("Mod ER
 | 
			
		||||
            }
 | 
			
		||||
            return(result)
 | 
			
		||||
        },
 | 
			
		||||
        need_load_hook: function(module, screen) {
 | 
			
		||||
            if (!module || !screen) return(true)
 | 
			
		||||
            if (("Character" === module) && ("Login" === screen)) return(true)
 | 
			
		||||
            return(false)
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
        // Command actions
 | 
			
		||||
        command_mbchc: function(argline, cmdline, args) { try {
 | 
			
		||||
@@ -369,14 +374,13 @@ var bcModSdk=function(){"use strict";const o="1.0.2";function e(o){alert("Mod ER
 | 
			
		||||
        }
 | 
			
		||||
        return(next(args))
 | 
			
		||||
    })
 | 
			
		||||
    /*  Things to keep in mind:
 | 
			
		||||
        1. mod may be loaded early or late
 | 
			
		||||
        2. if we're loaded past login screen, no need to hook anything, load directly
 | 
			
		||||
        3. if we're loaded into a chatroom we need to send greetings (should probably be in the loader function)
 | 
			
		||||
    */
 | 
			
		||||
//    if (!window.CurrentModule && !window.CurrentScreen) {
 | 
			
		||||
    window.MBCHC.sdk.hookFunction("AsylumGGTSSAddItems", 0, (args, next) => { window.MBCHC.loader(); return(next(args)) })
 | 
			
		||||
 | 
			
		||||
    // MAIN SCREEN TURN ON
 | 
			
		||||
    if (window.MBCHC.need_load_hook(window.CurrentModule, window.CurrentScreen)) {
 | 
			
		||||
        window.MBCHC.sdk.hookFunction("AsylumGGTSSAddItems", 0, (args, next) => { window.MBCHC.loader(); return(next(args)) })
 | 
			
		||||
    } else {
 | 
			
		||||
        window.MBCHC.loader()
 | 
			
		||||
    }
 | 
			
		||||
console.debug({module: window.CurrentModule, screen: window.CurrentScreen})
 | 
			
		||||
 | 
			
		||||
})()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user