foundryvtt-reve-de-dragon/module/simple.js

47 lines
1.6 KiB
JavaScript
Raw Normal View History

2020-05-21 21:48:20 +02:00
/**
* A simple and flexible system for world-building using an arbitrary collection of character and item attributes
* Author: Atropos
* Software License: GNU GPLv3
*/
// Import Modules
2020-05-22 00:48:43 +02:00
import { RdDActor } from "./actor.js";
import { RdDItemSheet } from "./item-sheet.js";
import { RdDActorSheet } from "./actor-sheet.js";
2020-05-21 21:48:20 +02:00
/* -------------------------------------------- */
/* Foundry VTT Initialization */
/* -------------------------------------------- */
Hooks.once("init", async function() {
2020-05-22 00:48:43 +02:00
console.log(`Initializing Reve de Dragon System`);
2020-05-21 21:48:20 +02:00
/**
* Set an initiative formula for the system
* @type {String}
*/
CONFIG.Combat.initiative = {
formula: "1d20",
decimals: 2
};
// Define custom Entity classes
2020-05-22 00:48:43 +02:00
CONFIG.Actor.entityClass = RdDActor;
2020-05-21 21:48:20 +02:00
// Register sheet application classes
Actors.unregisterSheet("core", ActorSheet);
2020-05-22 00:48:43 +02:00
Actors.registerSheet("foundryvtt-reve-de-dragon", RdDActorSheet, { makeDefault: true });
2020-05-21 21:48:20 +02:00
Items.unregisterSheet("core", ItemSheet);
2020-05-22 00:48:43 +02:00
Items.registerSheet("foundryvtt-reve-de-dragon", RdDItemSheet, {makeDefault: true});
2020-05-21 21:48:20 +02:00
// Register system settings
2020-05-22 00:48:43 +02:00
game.settings.register("foundryvtt-reve-de-dragon", "macroShorthand", {
2020-05-21 21:48:20 +02:00
name: "Shortened Macro Syntax",
hint: "Enable a shortened macro syntax which allows referencing attributes directly, for example @str instead of @attributes.str.value. Disable this setting if you need the ability to reference the full attribute model, for example @attributes.str.label.",
scope: "world",
type: Boolean,
default: true,
config: true
});
});