Update vtt types

This commit is contained in:
Johannes Loher 2021-07-07 19:22:35 +02:00
parent 623558dc78
commit c57960c153
24 changed files with 144 additions and 107 deletions

View file

@ -2,15 +2,17 @@
//
// SPDX-License-Identifier: MIT
import { getGame } from "../helpers";
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 notifications.warn(getGame().i18n.localize("DS4.WarningMustControlActorToUseRollCheckMacro"));
}
return actor.rollGenericCheck().catch((e) => notifications.error(e, { log: true }));