Improve cloning-detection in the preCreate hook so that we can ignore duplications for creating attribute items
This commit is contained in:
parent
71fce2c0ca
commit
153f48a7c3
2 changed files with 11 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ export class PlayerData extends foundry.abstract.TypeDataModel {
|
|||
|
||||
// Assign the default items from the world setting if required
|
||||
const items = this.parent._source.items;
|
||||
if (items == null || items.length === 0) {
|
||||
if (items.length === 0 && !options.cloning) {
|
||||
const defaults = game.settings.get(__ID__, `actorDefaultAttributes`) ?? [];
|
||||
this.parent.updateSource({ items: defaults });
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue