Foundry v13 migraton, WIP

This commit is contained in:
2025-05-14 22:09:35 +02:00
parent cc4cbbc771
commit 6b053b189b
33 changed files with 151 additions and 96 deletions

View File

@@ -14,11 +14,11 @@ import { ItemAction } from "../item/item-actions.js";
* Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet}
*/
export class RdDBaseActorSheet extends ActorSheet {
export class RdDBaseActorSheet extends foundry.appv1.sheets.ActorSheet {
/** @override */
static get defaultOptions() {
return foundry.utils.mergeObject(ActorSheet.defaultOptions, {
return foundry.utils.mergeObject(foundry.appv1.sheets.ActorSheet.defaultOptions, {
classes: ["rdd", "sheet", "actor"],
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: undefined }],

View File

@@ -734,7 +734,7 @@ export class RdDBaseActor extends Actor {
name: this.getAlias(),
system: { description: this.system.description }
}
renderTemplate('systems/foundryvtt-reve-de-dragon/templates/post-actor.hbs', chatData)
foundry.applications.handlebars.renderTemplate('systems/foundryvtt-reve-de-dragon/templates/post-actor.hbs', chatData)
.then(html => ChatMessage.create(RdDUtility.chatDataSetup(html, modeOverride)));
}

View File

@@ -7,7 +7,7 @@ import { CATEGORIES_COMPETENCES, CATEGORIES_DRACONIC, Mapping } from "./mapping.
export class RdDActorExportSheet extends RdDActorSheet {
static init() {
loadTemplates([
foundry.applications.handlebars.loadTemplates([
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs",
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/blessure.hbs",
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/blessures.hbs",
@@ -21,7 +21,7 @@ export class RdDActorExportSheet extends RdDActorSheet {
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/protection.hbs",
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/sort.hbs",
])
Actors.registerSheet(SYSTEM_RDD, RdDActorExportSheet, { types: ["personnage"], makeDefault: false, label: "Feuille simplifiée" })
foundry.documents.collections.Actors.registerSheet(SYSTEM_RDD, RdDActorExportSheet, { types: ["personnage"], makeDefault: false, label: "Feuille simplifiée" })
}
static get defaultOptions() {

View File

@@ -26,7 +26,7 @@ const RANDOM_VALUES = {
export class AppPersonnageAleatoire extends FormApplication {
static preloadHandlebars() {
loadTemplates([
foundry.applications.handlebars.loadTemplates([
'systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs',
])
}