Improve Simple Worldbuilding sheet layout and macro syntax

This commit is contained in:
Andrew 2020-04-18 16:14:51 -07:00
parent 6dbee061d6
commit d405a18f53
8 changed files with 350 additions and 138 deletions

View file

@ -5,6 +5,7 @@
*/
// Import Modules
import { SimpleActor } from "./actor.js";
import { SimpleItemSheet } from "./item-sheet.js";
import { SimpleActorSheet } from "./actor-sheet.js";
@ -24,9 +25,22 @@ Hooks.once("init", async function() {
decimals: 2
};
// Define custom Entity classes
CONFIG.Actor.entityClass = SimpleActor;
// Register sheet application classes
Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("dnd5e", SimpleActorSheet, { makeDefault: true });
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("dnd5e", SimpleItemSheet, {makeDefault: true});
// Register system settings
game.settings.register("worldbuilding", "macroShorthand", {
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
});
});