This commit is contained in:
Vlyan
2020-12-08 18:48:02 +01:00
40 changed files with 615 additions and 229 deletions

View File

@@ -6,6 +6,10 @@ import { ActorSheetL5r5e } from "./sheets/actor-sheet.js";
import { RollL5r5e } from "./dice/roll.js";
import { AbilityDie } from "./dice/dietype/ability-die.js";
import { RingDie } from "./dice/dietype/ring-die.js";
import { ItemL5r5e } from "./items/item.js";
import { ItemSheetL5r5e } from "./items/item-sheet.js";
import { WeaponSheetL5r5e } from "./items/weapon-sheet.js";
import { FeatSheetL5r5e } from "./items/feat-sheet.js";
// Import Dice Types
@@ -18,6 +22,7 @@ Hooks.once("init", async function () {
// Assign custom classes and constants here
CONFIG.Actor.entityClass = ActorL5r5e;
CONFIG.Actor.sheetClasses = ActorSheetL5r5e;
CONFIG.Item.entityClass = ItemL5r5e;
// Define custom Roll class
CONFIG.Dice.rolls.push(CONFIG.Dice.rolls[0]);
@@ -46,6 +51,12 @@ Hooks.once("init", async function () {
Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("l5r5e", ActorSheetL5r5e, { types: ["character"], makeDefault: true });
// Items sheet
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("l5r5e", ItemSheetL5r5e, { types: ["item"], makeDefault: true });
Items.registerSheet("l5r5e", WeaponSheetL5r5e, { types: ["weapon"], makeDefault: true });
Items.registerSheet("l5r5e", FeatSheetL5r5e, { types: ["feat"], makeDefault: true });
Handlebars.registerHelper("localizeSkillCategory", function (skillName) {
const key = "L5r5e.Skills." + skillName + ".Title";
return game.i18n.localize(key);