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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user