Add rolls and new fixes
All checks were successful
Release Creation / build (release) Successful in 1m2s

This commit is contained in:
2025-05-25 00:01:39 +02:00
parent 4bed84358b
commit 585b9a1ab5
20 changed files with 389 additions and 223 deletions

View File

@@ -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

View File

@@ -6,7 +6,7 @@ export default class HellbornTarotSheet extends HellbornItemSheet {
classes: ["tarot"],
position: {
width: 800,
height: 640
height: 800
},
window: {
contentClasses: ["tarot-content"],
@@ -23,8 +23,9 @@ export default class HellbornTarotSheet extends HellbornItemSheet {
/** @override */
async _prepareContext() {
const context = await super._prepareContext()
context.enrichedPositiveEffect = await TextEditor.enrichHTML(this.document.system.positiveEffect, { async: true })
context.enrichedNegativeEffect = await TextEditor.enrichHTML(this.document.system.negativeEffect, { async: true })
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
context.enrichedPositiveEffect = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.positiveEffect, { async: true })
context.enrichedNegativeEffect = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.negativeEffect, { async: true })
return context
}
}