mirror of
https://github.com/RoY7x/worldbuilding.git
synced 2025-07-04 05:37:11 -04:00
[#25] Ensure resource attribute values are clamped between their min and max. Ensure token attribute update deltas are applied correctly to resource attributes. Draw attribute bars appropriately when attribute min is non-zero.
This commit is contained in:
parent
abc9e949a7
commit
d799fb1c56
5 changed files with 72 additions and 3 deletions
|
@ -10,7 +10,7 @@ import { SimpleItemSheet } from "./item-sheet.js";
|
|||
import { SimpleActorSheet } from "./actor-sheet.js";
|
||||
import { preloadHandlebarsTemplates } from "./templates.js";
|
||||
import { createWorldbuildingMacro } from "./macro.js";
|
||||
import { SimpleTokenDocument } from "./simpletokendocument.js";
|
||||
import { SimpleToken, SimpleTokenDocument } from "./token.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Foundry VTT Initialization */
|
||||
|
@ -40,9 +40,8 @@ Hooks.once("init", async function() {
|
|||
// Define custom Document classes
|
||||
CONFIG.Actor.documentClass = SimpleActor;
|
||||
CONFIG.Item.documentClass = SimpleItem;
|
||||
|
||||
// Update TokenDocument with overrided getBarAttribute method
|
||||
CONFIG.Token.documentClass = SimpleTokenDocument;
|
||||
CONFIG.Token.objectClass = SimpleToken;
|
||||
|
||||
// Register sheet application classes
|
||||
Actors.unregisterSheet("core", ActorSheet);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue