Update 'mbchc-local.user.js'
This commit is contained in:
parent
6fbe13b17a
commit
0145147333
|
@ -24,7 +24,8 @@ var bcModSdk=function(){"use strict";const o="1.0.2";function e(o){alert("Mod ER
|
||||||
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: 'trunk',
|
VERSION: "trunk",
|
||||||
|
TARGET_VERSION: "R82",
|
||||||
NEXT_MESSAGE: 1,
|
NEXT_MESSAGE: 1,
|
||||||
LOG_MESSAGES: false,
|
LOG_MESSAGES: false,
|
||||||
RETHROW: false,
|
RETHROW: false,
|
||||||
|
@ -56,7 +57,7 @@ var bcModSdk=function(){"use strict";const o="1.0.2";function e(o){alert("Mod ER
|
||||||
],
|
],
|
||||||
HIDE_ITEMS: [
|
HIDE_ITEMS: [
|
||||||
"ItemMisc","ItemEars","ItemHead","ItemNose","ItemHood","ItemAddon","ItemMouth","ItemMouth2","ItemMouth3",
|
"ItemMisc","ItemEars","ItemHead","ItemNose","ItemHood","ItemAddon","ItemMouth","ItemMouth2","ItemMouth3",
|
||||||
"ItemArms","ItemNeckAccessories","ItemNeck","ItemNeckRestraints","ItemNipples","ItemNipplesPiercings","ItemBreast","ItemTorso",
|
"ItemArms","ItemNeckAccessories","ItemNeck","ItemNeckRestraints","ItemNipples","ItemNipplesPiercings","ItemBreast","ItemTorso","ItemTorso2",
|
||||||
"ItemHands","ItemPelvis","ItemVulva","ItemVulvaPiercings",
|
"ItemHands","ItemPelvis","ItemVulva","ItemVulvaPiercings",
|
||||||
"ItemDevices","ItemLegs","ItemFeet","ItemBoots"
|
"ItemDevices","ItemLegs","ItemFeet","ItemBoots"
|
||||||
],
|
],
|
||||||
|
@ -563,6 +564,7 @@ var bcModSdk=function(){"use strict";const o="1.0.2";function e(o){alert("Mod ER
|
||||||
window.CommandCombine(COMMANDS)
|
window.CommandCombine(COMMANDS)
|
||||||
this.LOADED = true
|
this.LOADED = true
|
||||||
this.log("info", `loaded version ${this.VERSION}`)
|
this.log("info", `loaded version ${this.VERSION}`)
|
||||||
|
if (window.GameVersion !== this.TARGET_VERSION) console.warn(`Game version doesn't match the target ("${this.TARGET_VERSION}"), beware of incompatibilities`) // TODO: check betas & cheat
|
||||||
}
|
}
|
||||||
} // MBCHC
|
} // MBCHC
|
||||||
|
|
||||||
|
@ -612,17 +614,17 @@ var bcModSdk=function(){"use strict";const o="1.0.2";function e(o){alert("Mod ER
|
||||||
let colour = (C.MBCHC.VERSION === window.Player.MBCHC.VERSION) ? window.MBCHC.RGB_POLLY : window.MBCHC.RGB_MUTE
|
let colour = (C.MBCHC.VERSION === window.Player.MBCHC.VERSION) ? window.MBCHC.RGB_POLLY : window.MBCHC.RGB_MUTE
|
||||||
window.DrawRect(CharX + 175 * Zoom, CharY, 50 * Zoom, 50 * Zoom, colour)
|
window.DrawRect(CharX + 175 * Zoom, CharY, 50 * Zoom, 50 * Zoom, colour)
|
||||||
}
|
}
|
||||||
if (C.MBCHC_LOCAL && C.MBCHC_LOCAL.TZ) {
|
if ((window.ChatRoomHideIconState < 1) && C.MBCHC_LOCAL && C.MBCHC_LOCAL.TZ) {
|
||||||
let localtime = new Date(window.CommonTime() + window.MBCHC.UTC_OFFSET + C.MBCHC_LOCAL.TZ * 60 * 60 * 1000)
|
let localtime = new Date(window.CommonTime() + window.MBCHC.UTC_OFFSET + C.MBCHC_LOCAL.TZ * 60 * 60 * 1000)
|
||||||
let text = localtime.toLocaleTimeString([], {hourCycle: "h24", hour: "2-digit"})
|
let text = localtime.toLocaleTimeString([], {hourCycle: "h24", hour: "2-digit"})
|
||||||
window.DrawTextFit(text, CharX + 200 * Zoom, CharY + 25 * Zoom, 46 * Zoom, "white", "black")
|
window.DrawTextFit(text, CharX + 200 * Zoom, CharY + 25 * Zoom, 46 * Zoom, "white", "black")
|
||||||
}
|
}
|
||||||
return(next(nextargs))
|
return(next(nextargs))
|
||||||
})
|
})
|
||||||
window.MBCHC.sdk.hookFunction("ElementCreateInput", 0, (nextargs, next) => {
|
window.MBCHC.sdk.hookFunction("ElementValue", 0, (nextargs, next) => { // TODO: layer priority will be locked too if it's the same as difficulty
|
||||||
let [ID, Type, Value, MaxLength] = nextargs
|
let [ID, Value] = nextargs
|
||||||
let result = next(nextargs)
|
let result = next(nextargs)
|
||||||
if (("bce_LayerPriority" === ID) && window.CurrentCharacter && window.CurrentCharacter.FocusGroup && window.InventoryLocked(window.CurrentCharacter, window.CurrentCharacter.FocusGroup.Name, true)) window.ElementSetAttribute(ID, "disabled", true)
|
if (("bce_LayerPriority" === ID) && window.CurrentCharacter?.FocusGroup && (window.InventoryGet(window.CurrentCharacter, window.CurrentCharacter.FocusGroup.Name)?.Difficulty.toString() === Value) && window.InventoryLocked(window.CurrentCharacter, window.CurrentCharacter.FocusGroup.Name, true)) window.ElementSetAttribute(ID, "disabled", true)
|
||||||
return(result)
|
return(result)
|
||||||
})
|
})
|
||||||
window.MBCHC.sdk.hookFunction("ChatRoomCreateElement", 0, (nextargs, next) => {
|
window.MBCHC.sdk.hookFunction("ChatRoomCreateElement", 0, (nextargs, next) => {
|
||||||
|
@ -645,9 +647,19 @@ var bcModSdk=function(){"use strict";const o="1.0.2";function e(o){alert("Mod ER
|
||||||
}
|
}
|
||||||
return(result)
|
return(result)
|
||||||
})
|
})
|
||||||
|
window.MBCHC.sdk.hookFunction("DocumentKeyDown", 0, (nextargs, next) => {
|
||||||
|
let [event] = nextargs
|
||||||
|
if ("InputChat" === document.activeElement.id) return(next(nextargs))
|
||||||
|
if ("inline" === document.getElementById("InputChat")?.style.display) window.ElementFocus("InputChat")
|
||||||
|
return(next(nextargs))
|
||||||
|
})
|
||||||
window.MBCHC.sdk.hookFunction("ChatRoomKeyDown", 0, (nextargs, next) => {
|
window.MBCHC.sdk.hookFunction("ChatRoomKeyDown", 0, (nextargs, next) => {
|
||||||
|
let [event] = nextargs
|
||||||
window.MBCHC.complete_hint_hide()
|
window.MBCHC.complete_hint_hide()
|
||||||
if ((window.KeyPress == 33) || (window.KeyPress == 34)) return(window.MBCHC.history(window.KeyPress - 33)) // better history
|
if ((window.KeyPress == 33) || (window.KeyPress == 34)) { // better history
|
||||||
|
event.preventDefault()
|
||||||
|
return(window.MBCHC.history(window.KeyPress - 33))
|
||||||
|
}
|
||||||
if (window.MBCHC.HISTORY_MODE) {
|
if (window.MBCHC.HISTORY_MODE) {
|
||||||
window.ChatRoomLastMessage.pop()
|
window.ChatRoomLastMessage.pop()
|
||||||
window.MBCHC.HISTORY_MODE = false
|
window.MBCHC.HISTORY_MODE = false
|
||||||
|
|
Loading…
Reference in New Issue
Block a user