mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-23 16:03:39 +02:00
Improved
This commit is contained in:
parent
28efef7951
commit
9cdfd7a27a
11 changed files with 151 additions and 69 deletions
|
|
@ -290,6 +290,16 @@ export default class DHBaseItemSheet extends DHApplicationMixin(ItemSheetV2) {
|
|||
|
||||
const item = await fromUuid(data.uuid);
|
||||
if (item?.type === 'feature') {
|
||||
if (item.system.originId) {
|
||||
const origin = await foundry.utils.fromUuid(item.system.originId);
|
||||
return ui.notifications.warn(
|
||||
game.i18n.format('DAGGERHEART.UI.Notifications.featureAlreadyLinked', {
|
||||
name: item.name,
|
||||
origin: origin.name
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
await item.update({
|
||||
system: {
|
||||
originItemType: CONFIG.DH.ITEM.featureTypes[this.document.type].id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue