Update vtt types
This commit is contained in:
parent
623558dc78
commit
c57960c153
24 changed files with 144 additions and 107 deletions
|
@ -5,6 +5,7 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { DS4 } from "../config";
|
||||
import { getGame } from "../helpers";
|
||||
import notifications from "../ui/notifications";
|
||||
import { isDS4ItemDataTypePhysical } from "./item-data-source";
|
||||
|
||||
|
@ -70,7 +71,7 @@ export class DS4ItemSheet extends ItemSheet<ItemSheet.Options, DS4ItemSheetData>
|
|||
event.preventDefault();
|
||||
|
||||
if (this.item.isOwned) {
|
||||
return notifications.warn(game.i18n.localize("DS4.WarningManageActiveEffectOnOwnedItem"));
|
||||
return notifications.warn(getGame().i18n.localize("DS4.WarningManageActiveEffectOnOwnedItem"));
|
||||
}
|
||||
const a = event.currentTarget;
|
||||
const li = $(a).parents(".effect");
|
||||
|
@ -82,7 +83,9 @@ export class DS4ItemSheet extends ItemSheet<ItemSheet.Options, DS4ItemSheetData>
|
|||
const id = li.data("effectId");
|
||||
const effect = this.item.effects.get(id);
|
||||
if (!effect) {
|
||||
throw new Error(game.i18n.format("DS4.ErrorItemDoesNotHaveEffect", { id, item: this.item.name }));
|
||||
throw new Error(
|
||||
getGame().i18n.format("DS4.ErrorItemDoesNotHaveEffect", { id, item: this.item.name }),
|
||||
);
|
||||
}
|
||||
return effect.sheet.render(true);
|
||||
case "delete": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue