mirror of
https://github.com/RoY7x/worldbuilding.git
synced 2025-07-04 05:37:11 -04:00
Improve Simple Worldbuilding sheet layout and macro syntax
This commit is contained in:
parent
6dbee061d6
commit
d405a18f53
8 changed files with 350 additions and 138 deletions
|
@ -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
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue