Improved item-identicial check

This commit is contained in:
WBHarry 2025-11-23 13:07:18 +01:00
parent 5d0a59bd12
commit 3c9bbf770c
2 changed files with 10 additions and 3 deletions

View file

@ -437,3 +437,11 @@ export function shuffleArray(array) {
return array;
}
export function itemIsIdentical(a, b) {
const compendiumSource = a._stats.compendiumSource === b._stats.compendiumSource;
const name = a.name === b.name;
const description = a.system.description === b.system.description;
return compendiumSource && name & description;
}