Skip to content

Commit

Permalink
Update Actor Model for 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunkLightTuna committed Dec 9, 2023
1 parent 9e395f7 commit 9aab2e7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/sync.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,16 @@ export function enrich_actor(actor) {
(k, v) => v instanceof Set ? [...v] : v)
)
clone_pc.details.dead = Boolean(actor.effects.find(e => !e.disabled && e.name === 'Dead'))
clone_pc.details.background = actor.system.details.background ? actor.system.details.background.name : ''
clone_pc.details.race = actor.system.details.race ? actor.system.details.race.name : ''
clone_pc.details.background = typeof actor.system.details.background === "string" ?
actor.system.details.background :
actor.system.details.background ?
actor.system.details.background.name :
''
clone_pc.details.race = typeof actor.system.details.race === "string" ?
actor.system.details.race :
actor.system.details.race ?
actor.system.details.race.name :
''

return {
...prune_roll_data(clone_pc),
Expand Down

0 comments on commit 9aab2e7

Please sign in to comment.