This commit is contained in:
2020-05-22 19:28:01 +02:00
parent 4ed1c804a0
commit 6c65c048a2
13 changed files with 318 additions and 308 deletions

View File

@ -1,21 +1,54 @@
/**
* A simple and flexible system for world-building using an arbitrary collection of character and item attributes
* Author: Atropos
* RdD system
* Author: LeRatierBretonnien
* Software License: GNU GPLv3
*/
/* -------------------------------------------- */
const RDD = {}
RDD.level_category = {
"generale": "-4",
"particuliere": "-8",
"speciale": "-11",
"connaissance": "-11",
"draconic": "-11",
"melee": "-6",
"tir": "-8",
"lancer": "-8"
}
/* -------------------------------------------- */
// Import Modules
import { RdDActor } from "./actor.js";
import { RdDItemSheet } from "./item-sheet.js";
import { RdDActorSheet } from "./actor-sheet.js";
/* -------------------------------------------- */
// Handlers management
const preloadHandlebarsTemplates = async function () {
const templatePaths = [
//Character Sheets
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet.html',
//Items
'systems/foundryvtt-reve-de-dragon/templates/item-competence-sheet.html',
'systems/foundryvtt-reve-de-dragon/templates/competence-categorie.html',
'systems/foundryvtt-reve-de-dragon/templates/competence-carac-defaut.html',
'systems/foundryvtt-reve-de-dragon/templates/competence-base.html'
];
return loadTemplates(templatePaths);
}
/* -------------------------------------------- */
/* Foundry VTT Initialization */
/* -------------------------------------------- */
Hooks.once("init", async function() {
console.log(`Initializing Reve de Dragon System`);
// preload handlebars templates
preloadHandlebarsTemplates();
/**
* Set an initiative formula for the system
* @type {String}
@ -27,7 +60,8 @@ Hooks.once("init", async function() {
// Define custom Entity classes
CONFIG.Actor.entityClass = RdDActor;
CONFIG.RDD = RDD;
// Register sheet application classes
Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("foundryvtt-reve-de-dragon", RdDActorSheet, { makeDefault: true });