Skip to content

Commit

Permalink
add equipment with a rarity
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunkLightTuna committed Jan 11, 2024
1 parent 8f9ce1c commit 4bc2955
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sync.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ export function enrich_actor(actor) {
.filter(item => item.hasAttack && item.type !== 'consumable')
.map(item => gen_item_deets(item, actor.system.details.level))

const equipment = actor.items
.filter(item => item.type === "equipment" && item.system?.rarity)
.map(item => item.name)


let currency = actor.system['currency']
for (const key in currency) {
if (currency.hasOwnProperty(key) && !currency[key]) {
Expand Down Expand Up @@ -141,6 +146,7 @@ export function enrich_actor(actor) {
id: actor.id,
discord_ids: actor_to_discord_ids(actor),
weapons: weapons,
equipment: equipment,
portrait_url: portrait_url
}
}
Expand Down

0 comments on commit 4bc2955

Please sign in to comment.