Initial system development

This commit is contained in:
2021-01-18 17:46:39 +01:00
parent 199dc4c6ed
commit ca29af6b61
10 changed files with 1446 additions and 38 deletions

View File

@ -11,9 +11,7 @@
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";
import { SoSUtility } from "./sos-utility.js";
/* -------------------------------------------- */
/* Foundry VTT Initialization */
@ -36,7 +34,7 @@ Hooks.once("init", async function () {
// preload handlebars templates
SoSUtility.preloadHandlebarsTemplates();
// Create useful storage space
game.system.sos = { TMRUtility: TMRUtility }
game.system.sos = { }
/* -------------------------------------------- */
// Set an initiative formula for the system
@ -59,9 +57,9 @@ Hooks.once("init", async function () {
/* -------------------------------------------- */
// Register sheet application classes
Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("foundryvtt-reve-de-dragon", SoSActorSheet, { types: ["character"], makeDefault: true });
Actors.registerSheet("foundryvtt-shadows-over-sol", SoSActorSheet, { types: ["character"], makeDefault: true });
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("foundryvtt-reve-de-dragon", SoSItemSheet, { makeDefault: true });
Items.registerSheet("foundryvtt-shadows-over-sol", SoSItemSheet, { makeDefault: true });
// Patch the initiative formula
_patch_initiative();
@ -70,7 +68,7 @@ Hooks.once("init", async function () {
/* -------------------------------------------- */
function welcomeMessage() {
ChatUtility.removeMyChatMessageContaining('<div id="welcome-message-sos">');
//ChatUtility.removeMyChatMessageContaining('<div id="welcome-message-sos">');
ChatMessage.create({
user: game.user._id,
whisper: [game.user._id],
@ -112,6 +110,6 @@ Hooks.on("chatMessage", (html, content, msg) => {
/* -------------------------------------------- */
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
RdDUtility.pushInitiativeOptions(html, options);
//SoS.pushInitiativeOptions(html, options);
}
)