Manage GM cards

This commit is contained in:
2021-03-08 22:46:33 +01:00
parent 10fbcec5fb
commit c2c837b778
10 changed files with 193 additions and 25 deletions

View File

@@ -14,6 +14,7 @@ import { SoSActorSheet } from "./actor-sheet.js";
import { SoSUtility } from "./sos-utility.js";
import { SoSCombat } from "./sos-combat.js";
import { gearConverter } from "./gears_convert.js";
import { SoSGMDeck } from "./sos-gm-deck.js";
/* -------------------------------------------- */
/* Foundry VTT Initialization */
@@ -23,10 +24,24 @@ import { gearConverter } from "./gears_convert.js";
Hooks.once("init", async function () {
console.log(`Initializing Shadows Over Sol System`);
/* -------------------------------------------- */
game.settings.register("foundryvtt-shadows-over-sol", "gmDeck", {
name: "gmDeck",
scope: "world",
config: false,
type: Object
});
/* -------------------------------------------- */
// preload handlebars templates
SoSUtility.preloadHandlebarsTemplates();
// Create useful storage space
game.system.sos = { }
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/gm-deck.html', {} );
let gmDeck = new SoSGMDeck(html);
gmDeck.render(true);
game.system.sos = {
gmDeck: gmDeck,
}
/* -------------------------------------------- */
// Set an initiative formula for the system