Spells and ranged attacks. Partial cleanup of i18n
This commit is contained in:
parent
1d5328a9f1
commit
4619b787e5
5 changed files with 139 additions and 12 deletions
|
|
@ -85,10 +85,16 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
|
|||
case 'skills':
|
||||
this.#handleSkillAction(actor, actionId)
|
||||
break
|
||||
case 'spells':
|
||||
this.#handleSpellAction(actor, actionId)
|
||||
break
|
||||
case 'melee':
|
||||
this.#handleMeleeAction(actor, actionId)
|
||||
break
|
||||
}
|
||||
case 'ranged':
|
||||
this.#handleRangedAction(actor, actionId)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -139,6 +145,27 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
|
|||
doRoll({ actor, formula, targetmods, prefix, thing, chatthing, origtarget: target, optionalArgs: opt })
|
||||
}
|
||||
|
||||
async #handleMeleeAction(actor, actionId) {
|
||||
/* Melee attacks are done using the otf method. Grab the otf and pass it to the function. */
|
||||
let GURPS = globalThis.GURPS;
|
||||
|
||||
// debugger;
|
||||
let otf = actionId;
|
||||
GURPS.executeOTF(otf, actor=actor);
|
||||
}
|
||||
|
||||
async #handleRangedAction(actor, actionId) {
|
||||
/* Melee attacks are done using the otf method. Grab the otf and pass it to the function. */
|
||||
let GURPS = globalThis.GURPS;
|
||||
|
||||
// debugger;
|
||||
let otf = actionId;
|
||||
GURPS.executeOTF(otf, actor=actor);
|
||||
|
||||
|
||||
// doRoll({ actor, formula, targetmods, prefix, thing, chatthing, origtarget: target, optionalArgs: opt })
|
||||
}
|
||||
|
||||
async #handleSkillAction(actor, actionId) {
|
||||
/* Skills are done using the otf method. Grab the otf and pass it to the function. */
|
||||
let GURPS = globalThis.GURPS;
|
||||
|
|
@ -146,12 +173,23 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
|
|||
|
||||
// executeOTF(inputstring, priv = false, event = null, actor = null) {
|
||||
|
||||
debugger;
|
||||
// debugger;
|
||||
let otf = actionId;
|
||||
GURPS.executeOTF(otf, actor=actor);
|
||||
|
||||
|
||||
// doRoll({ actor, formula, targetmods, prefix, thing, chatthing, origtarget: target, optionalArgs: opt })
|
||||
}
|
||||
|
||||
async #handleSpellAction(actor, actionId) {
|
||||
/* Spells are done using the otf method. Grab the otf and pass it to the function. */
|
||||
let GURPS = globalThis.GURPS;
|
||||
|
||||
// debugger;
|
||||
let otf = actionId;
|
||||
GURPS.executeOTF(otf, actor=actor);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue