/** * RdD system * Author: LeRatierBretonnien * Software License: GNU GPLv3 */ /* -------------------------------------------- */ /* -------------------------------------------- */ // Import Modules import { SoSActor } from "./actor.js"; import { SoSItemSheet } from "./item-sheet.js"; import { SoSActorSheet } from "./actor-sheet.js"; import { SoSUtility } from "./rdd-utility.js"; //import { SoSTokenHud } from "./rdd-token-hud.js"; //import { SoSCommands } from "./rdd-commands.js"; /* -------------------------------------------- */ /* Foundry VTT Initialization */ /* -------------------------------------------- */ /************************************************************************************/ const _patch_initiative = () => { Combat.prototype.rollInitiative = async function ( ids, formula = undefined, messageOptions = {} ) { } } /************************************************************************************/ Hooks.once("init", async function () { console.log(`Initializing Shadows over Sol System`); // preload handlebars templates SoSUtility.preloadHandlebarsTemplates(); // Create useful storage space game.system.sos = { TMRUtility: TMRUtility } /* -------------------------------------------- */ // Set an initiative formula for the system CONFIG.Combat.initiative = { formula: "1+(1d6/10)", decimals: 2 }; /* -------------------------------------------- */ game.socket.on("system.foundryvtt-shadows-over-sol", data => { SoSUtility.onSocketMesssage(data); }); /* -------------------------------------------- */ // Define custom Entity classes CONFIG.Actor.entityClass = SoSActor; CONFIG.SoS = { } /* -------------------------------------------- */ // Register sheet application classes Actors.unregisterSheet("core", ActorSheet); Actors.registerSheet("foundryvtt-reve-de-dragon", SoSActorSheet, { types: ["character"], makeDefault: true }); Items.unregisterSheet("core", ItemSheet); Items.registerSheet("foundryvtt-reve-de-dragon", SoSItemSheet, { makeDefault: true }); // Patch the initiative formula _patch_initiative(); }); /* -------------------------------------------- */ function welcomeMessage() { ChatUtility.removeMyChatMessageContaining('