Foundry v13 migrtion

This commit is contained in:
2025-05-02 18:58:29 +02:00
parent 15e249e41e
commit fef3e44941
80 changed files with 465 additions and 387 deletions

View File

@@ -37,14 +37,14 @@ Hooks.once("init", async function () {
// preload handlebars templates
SoSUtility.preloadHandlebarsTemplates();
// Create useful storage space
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/gm-deck.html', {} );
let html = await foundry.applications.handlebars.renderTemplate('systems/foundryvtt-shadows-over-sol/templates/gm-deck.html', {} );
let gmDeck = new SoSGMDeck(html);
game.system.sos = {
game.system.sos = {
gmDeck: gmDeck,
}
/* -------------------------------------------- */
// Set an initiative formula for the system
// Set an initiative formula for the system
CONFIG.Combat.initiative = {
formula: "1d3",
decimals: 2
@@ -64,10 +64,10 @@ Hooks.once("init", async function () {
/* -------------------------------------------- */
// Register sheet application classes
Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("foundryvtt-shadows-over-sol", SoSActorSheet, { types: ["character"], makeDefault: true });
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("foundryvtt-shadows-over-sol", SoSItemSheet, { makeDefault: true });
foundry.documents.collections.Actors.unregisterSheet("core", foundry.appv1.sheets.ActorSheet);
foundry.documents.collections.Actors.registerSheet("foundryvtt-shadows-over-sol", SoSActorSheet, { types: ["character"], makeDefault: true });
foundry.documents.collections.Items.unregisterSheet("core", foundry.appv1.sheets.ItemSheet);
foundry.documents.collections.Items.registerSheet("foundryvtt-shadows-over-sol", SoSItemSheet, { makeDefault: true });
// Init/registers
Hooks.on('renderChatLog', (log, html, data) => {
@@ -77,7 +77,7 @@ Hooks.once("init", async function () {
Hooks.on('updateCombat', (combat, round, diff, id) => {
SoSUtility.updateCombat(combat, round, diff, id);
});
});
/* -------------------------------------------- */
@@ -105,7 +105,7 @@ Hooks.once("ready", function () {
}
ClassCounter.registerUsageCount()
SoSUtility.ready()
welcomeMessage();
});