Add rolls and new fixes
All checks were successful
Release Creation / build (release) Successful in 1m2s
All checks were successful
Release Creation / build (release) Successful in 1m2s
This commit is contained in:
@@ -73,6 +73,8 @@ export default class HellbornCharacterSheet extends HellbornActorSheet {
|
||||
|
||||
const doc = this.document
|
||||
context.trait = doc.itemTypes['species-trait']?.[0]
|
||||
context.upright = doc.itemTypes.tarot.find(t => t.system.orientation === "Upright")
|
||||
context.downright = doc.itemTypes.tarot.find(t => t.system.orientation === "Downright")
|
||||
|
||||
return context
|
||||
}
|
||||
@@ -108,8 +110,6 @@ export default class HellbornCharacterSheet extends HellbornActorSheet {
|
||||
case "biography":
|
||||
context.tab = context.tabs.biography
|
||||
context.deals = doc.itemTypes.deal
|
||||
context.deals.sort((a, b) => a.name.localeCompare(b.name))
|
||||
context.tarot = doc.itemTypes.tarot?.[0]
|
||||
context.enrichedBackstory = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.backstory, { async: true })
|
||||
context.enrichedAppearance = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.appearance, { async: true })
|
||||
context.enrichedScars = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.scars, { async: true })
|
||||
@@ -199,7 +199,7 @@ export default class HellbornCharacterSheet extends HellbornActorSheet {
|
||||
const item = await fromUuid(data.uuid)
|
||||
if (item.type === "tarot") {
|
||||
// Delete the existing tarot item
|
||||
const existingTarot = this.document.items.find(i => i.type === "tarot")
|
||||
const existingTarot = this.document.items.find(i => i.type === "tarot" && i.system.orientation === item.system.orientation)
|
||||
if (existingTarot) {
|
||||
await existingTarot.delete()
|
||||
// Display info message
|
||||
|
||||
Reference in New Issue
Block a user