Skills workng
This commit is contained in:
parent
4f5b33d29b
commit
9de7b72c02
5 changed files with 64 additions and 3 deletions
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
import {doRoll} from "/systems/gurps/module/dierolls/dieroll.js"
|
||||
|
||||
// Do we need to use executeOTF?
|
||||
|
||||
export let RollHandler = null
|
||||
|
||||
Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
|
||||
|
|
@ -79,6 +81,10 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
|
|||
break
|
||||
case 'attributes':
|
||||
this.#handleAttributeAction(actor, actionId)
|
||||
break
|
||||
case 'skills':
|
||||
this.#handleSkillAction(actor, actionId)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -105,7 +111,7 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
|
|||
case 'endTurn':
|
||||
if (game.combat?.current?.tokenId === token.id) {
|
||||
await game.combat?.nextTurn()
|
||||
}
|
||||
}executeOTF
|
||||
break
|
||||
}
|
||||
}
|
||||
|
|
@ -129,5 +135,20 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
|
|||
|
||||
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;
|
||||
// actor, formula, targetmods, prefix = '', thing = '', chatthing = '', origtarget = -1, optionalArgs = {},
|
||||
|
||||
// executeOTF(inputstring, priv = false, event = null, actor = null) {
|
||||
|
||||
debugger;
|
||||
let otf = actionId;
|
||||
GURPS.executeOTF(otf, actor=actor);
|
||||
|
||||
|
||||
// doRoll({ actor, formula, targetmods, prefix, thing, chatthing, origtarget: target, optionalArgs: opt })
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue