Update 'mbchc-local.user.js'
This commit is contained in:
parent
a140c3a301
commit
8d6669795b
|
@ -27,6 +27,7 @@ var bcModSdk=function(){"use strict";const o="1.0.2";function e(o){alert("Mod ER
|
|||
VERSION: 'trunk',
|
||||
NEXT_MESSAGE: 1,
|
||||
LOG_MESSAGES: false,
|
||||
RETHROW: false,
|
||||
LOADED: false,
|
||||
AUTOHACK_ENABLED: false,
|
||||
LAST_HACKED: null,
|
||||
|
@ -210,7 +211,10 @@ var bcModSdk=function(){"use strict";const o="1.0.2";function e(o){alert("Mod ER
|
|||
},
|
||||
bg_colour: function() { return(document.getElementById("TextAreaChatLog").dataset.colortheme.startsWith("light") ? this.RGB_POLLY : this.RGB_MUTE) },
|
||||
inform: function(html) { window.ChatRoomSendLocal(`<div style="background:${this.bg_colour()}">${html}</div>`, 60000) },
|
||||
report: function(x) { this.inform(`Error: ${x.toString()}`) },
|
||||
report: function(x) {
|
||||
this.inform(`Error: ${x.toString()}`)
|
||||
if (this.RETHROW) throw x
|
||||
},
|
||||
id2char: function(id) { return(window.ChatRoomCharacter.find( c => c.MemberNumber === Number.parseInt(id) )) },
|
||||
donate_data: function(recipient) {
|
||||
let id = Number.parseInt(recipient)
|
||||
|
@ -229,7 +233,7 @@ var bcModSdk=function(){"use strict";const o="1.0.2";function e(o){alert("Mod ER
|
|||
let activity = this.ensure("invalid activity", () => window.ActivityAllowedForGroup(char, char.FocusGroup.Name, true).find( a => a.Name === action))
|
||||
if (activity.Name.endsWith("Item")) {
|
||||
let item = this.ensure("no toy found", () => window.Player.Inventory.find(i => (i.Asset != null) && (i.Asset.Group.Name == char.FocusGroup.Name) && i.Asset.DynamicAllowInventoryAdd(char)))
|
||||
window.DialogItemClick(window.DialogInventoryCreateItem(char, item, false))
|
||||
window.DialogPublishAction(char, window.DialogInventoryCreateItem(char, item, false))
|
||||
} else {
|
||||
window.ActivityRun(char, activity)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user