mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
Ancestry and community is now reset when dragging in a new one
This commit is contained in:
parent
207220ff7b
commit
82058eceb7
1 changed files with 8 additions and 0 deletions
|
|
@ -907,6 +907,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