Update for Foundry v13

This commit is contained in:
2025-05-09 21:54:10 +02:00
parent c2f9934f5f
commit e1cea78059
122 changed files with 303 additions and 390 deletions

View File

@ -5,7 +5,7 @@
import { BoLRoll } from "../controllers/bol-rolls.js";
import { BoLUtility } from "../system/bol-utility.js";
export class BoLActorSheet extends ActorSheet {
export class BoLActorSheet extends foundry.appv1.sheets.ActorSheet {
/** @override */
static get defaultOptions() {
@ -59,7 +59,7 @@ export class BoLActorSheet extends ActorSheet {
let system = foundry.utils.duplicate(game.bol.config.defaultNaturalProtection)
this.actor.createEmbeddedDocuments('Item', [{ name: game.i18n.localize("BOL.ui.newNaturalProtection"), type: "item", system }], { renderSheet: true });
});
html.find(".toggle-fight-option").click((ev) => {
const li = $(ev.currentTarget).parents(".item")
this.actor.toggleFightOption(li.data("itemId"))
@ -170,8 +170,8 @@ export class BoLActorSheet extends ActorSheet {
formData.charType = this.actor.getCharType()
formData.villainy = this.actor.getVillainy()
formData.isUndead = this.actor.isUndead()
formData.biography = await TextEditor.enrichHTML(this.object.system.details?.biography || "", { async: true })
formData.notes = await TextEditor.enrichHTML(this.object.system.details.notes || "", { async: true })
formData.biography = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.details?.biography || "", { async: true })
formData.notes = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.details.notes || "", { async: true })
formData.isSorcerer = this.actor.isSorcerer()
formData.isAlchemist = this.actor.isAlchemist()
formData.isAstrologer = this.actor.isAstrologer()

View File

@ -5,7 +5,7 @@
import { BoLRoll } from "../controllers/bol-rolls.js";
import { BoLUtility } from "../system/bol-utility.js";
export class BoLHordeSheet extends ActorSheet {
export class BoLHordeSheet extends foundry.appv1.sheets.ActorSheet {
/** @override */
static get defaultOptions() {
@ -116,7 +116,7 @@ export class BoLHordeSheet extends ActorSheet {
formData.options = this.options
formData.owner = this.document.isOwner
formData.editScore = this.options.editScore
formData.description = await TextEditor.enrichHTML(this.actor.system.description, {async: true})
formData.description = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.actor.system.description, {async: true})
formData.isGM = game.user.isGM

View File

@ -5,7 +5,7 @@
import { BoLRoll } from "../controllers/bol-rolls.js";
import { BoLUtility } from "../system/bol-utility.js";
export class BoLVehicleSheet extends ActorSheet {
export class BoLVehicleSheet extends foundry.appv1.sheets.ActorSheet {
/** @override */
static get defaultOptions() {
@ -127,7 +127,7 @@ export class BoLVehicleSheet extends ActorSheet {
formData.options = this.options
formData.owner = this.document.isOwner
formData.editScore = this.options.editScore
formData.description = await TextEditor.enrichHTML(this.actor.system.description, {async: true})
formData.description = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.actor.system.description, {async: true})
formData.isGM = game.user.isGM