use notification wrapper
This commit is contained in:
parent
5d249d4c10
commit
d7fb8fd61a
2 changed files with 4 additions and 2 deletions
|
@ -2,6 +2,7 @@ import { ModifiableMaybeData } from "../../common/common-data";
|
|||
import { DS4 } from "../../config";
|
||||
import { DS4Item } from "../../item/item";
|
||||
import { DS4ItemData } from "../../item/item-data";
|
||||
import notifications from "../../ui/notifications";
|
||||
import { DS4Actor } from "../actor";
|
||||
|
||||
/**
|
||||
|
@ -257,7 +258,7 @@ export class DS4ActorSheet extends ActorSheet<ActorSheet.Data<DS4Actor>> {
|
|||
): Promise<boolean | undefined | ActorSheet.OwnedItemData<DS4Actor>> {
|
||||
const item = await DS4Item.fromDropData(data);
|
||||
if (item && !this.actor.canOwnItemType(item.data.type)) {
|
||||
ui.notifications?.warn(
|
||||
notifications.warn(
|
||||
game.i18n.format("DS4.WarningActorCannotOwnItem", {
|
||||
actorName: this.actor.name,
|
||||
actorType: this.actor.data.type,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { DS4 } from "../config";
|
||||
import notifications from "../ui/notifications";
|
||||
import { DS4Item } from "./item";
|
||||
import { isDS4ItemDataTypePhysical } from "./item-data";
|
||||
|
||||
|
@ -82,7 +83,7 @@ export class DS4ItemSheet extends ItemSheet<ItemSheet.Data<DS4Item>> {
|
|||
event.preventDefault();
|
||||
|
||||
if (this.item.isOwned) {
|
||||
return ui.notifications?.warn(game.i18n.localize("DS4.WarningManageActiveEffectOnOwnedItem"));
|
||||
return notifications.warn(game.i18n.localize("DS4.WarningManageActiveEffectOnOwnedItem"));
|
||||
}
|
||||
const a = event.currentTarget;
|
||||
const li = $(a).parents(".effect");
|
||||
|
|
Loading…
Reference in a new issue