System init
This commit is contained in:
@ -10,11 +10,11 @@ const __saveFirstToKey = { r: "reflex", f: "fortitude", w: "willpower"}
|
||||
export class DarkStarsCommands {
|
||||
|
||||
static init() {
|
||||
if (!game.system.cruciblerpg.commands) {
|
||||
const crucibleCommands = new DarkStarsCommands();
|
||||
crucibleCommands.registerCommand({ path: ["/rtarget"], func: (content, msg, params) => DarkStarsCommands.rollTarget(msg, params), descr: "Launch the target roll window" });
|
||||
crucibleCommands.registerCommand({ path: ["/rsave"], func: (content, msg, params) => DarkStarsCommands.rollSave(msg, params), descr: "Performs a save roll" });
|
||||
game.system.cruciblerpg.commands = crucibleCommands;
|
||||
if (!game.system.darkstars.commands) {
|
||||
const darkStarsCommands = new DarkStarsCommands();
|
||||
darkStarsCommands.registerCommand({ path: ["/rtarget"], func: (content, msg, params) => DarkStarsCommands.rollTarget(msg, params), descr: "Launch the target roll window" });
|
||||
darkStarsCommands.registerCommand({ path: ["/rsave"], func: (content, msg, params) => DarkStarsCommands.rollSave(msg, params), descr: "Performs a save roll" });
|
||||
game.system.darkstars.commands = darkStarsCommands;
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ export class DarkStarsCommands {
|
||||
if (path.length > 0 && path[0] && command.descr && (path.length != 1 || targetTable[path[0]] == undefined)) {
|
||||
return true;
|
||||
}
|
||||
console.warn("crucibleCommands._validateCommand failed ", targetTable, path, command);
|
||||
console.warn("darkStarsCommands._validateCommand failed ", targetTable, path, command);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user