refactor: resturcture files so that lincensing info can be bundled properly
This commit is contained in:
parent
699ba74840
commit
1aa284311f
484 changed files with 119 additions and 179 deletions
19
src/macros/roll-generic-check.ts
Normal file
19
src/macros/roll-generic-check.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
// SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { getGame } from "../helpers";
|
||||
import notifications from "../ui/notifications";
|
||||
import { getActiveActorAndToken } from "./helpers";
|
||||
|
||||
/**
|
||||
* Executes the roll generic check macro.
|
||||
*/
|
||||
export async function rollGenericCheck(): Promise<void> {
|
||||
const { actor, token } = getActiveActorAndToken();
|
||||
if (!actor) {
|
||||
return notifications.warn(getGame().i18n.localize("DS4.WarningMustControlActorToUseRollCheckMacro"));
|
||||
}
|
||||
|
||||
return actor.rollGenericCheck({ speaker: { token } }).catch((e) => notifications.error(e, { log: true }));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue