mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Ancestry and community is now reset when dragging in a new one (#1315)
This commit is contained in:
parent
ebf98a6ae5
commit
6398ba15f2
1 changed files with 8 additions and 0 deletions
|
|
@ -911,6 +911,14 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
itemData.system.inVault = true;
|
||||
}
|
||||
|
||||
const typesThatReplace = ['ancestry', 'community'];
|
||||
if (typesThatReplace.includes(item.type)) {
|
||||
await this.document.deleteEmbeddedDocuments(
|
||||
'Item',
|
||||
this.document.items.filter(x => x.type === item.type).map(x => x.id)
|
||||
);
|
||||
}
|
||||
|
||||
if (item.type === 'beastform') {
|
||||
if (this.document.effects.find(x => x.type === 'beastform')) {
|
||||
return ui.notifications.warn(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue