Add a macro to perform generic checks
This commit is contained in:
parent
441e907b8a
commit
24725c15f9
9 changed files with 138 additions and 29 deletions
|
@ -1,7 +1,9 @@
|
|||
import { rollCheck } from "./roll-check";
|
||||
import { rollGenericCheck } from "./roll-generic-check";
|
||||
import { rollItem } from "./roll-item";
|
||||
|
||||
export const macros = {
|
||||
rollCheck,
|
||||
rollGenericCheck,
|
||||
rollItem,
|
||||
};
|
||||
|
|
13
src/module/macros/roll-generic-check.ts
Normal file
13
src/module/macros/roll-generic-check.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import notifications from "../ui/notifications";
|
||||
import { getActiveActor } from "./helpers";
|
||||
/**
|
||||
* Executes the roll generic check macro.
|
||||
*/
|
||||
export async function rollGenericCheck(): Promise<void> {
|
||||
const actor = getActiveActor();
|
||||
if (!actor) {
|
||||
return notifications.warn(game.i18n.localize("DS4.WarningMustControlActorToUseRollCheckMacro"));
|
||||
}
|
||||
|
||||
return actor.rollGenericCheck();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue