mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 21:04:16 +02:00
Improved armor source names
This commit is contained in:
parent
404640a0a3
commit
9f1992f7c6
2 changed files with 7 additions and 9 deletions
|
|
@ -757,9 +757,12 @@ export function getArmorSources(actor) {
|
|||
// Get the origin item. Since the actor is already loaded, it should already be cached
|
||||
// Consider the relative function versions if this causes an issue
|
||||
const origin = doc.origin ? foundry.utils.fromUuidSync(doc.origin) : doc;
|
||||
const useParentName = doc.parent && !(doc.parent instanceof Actor);
|
||||
const name = doc.origin || !useParentName ? doc.name : doc.parent.name;
|
||||
|
||||
return {
|
||||
origin,
|
||||
name: origin.name,
|
||||
name,
|
||||
document: doc,
|
||||
data: doc.system.armor ?? doc.system.armorData,
|
||||
disabled: !!doc.disabled || !!doc.isSuppressed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue