v12 fixes

- Removal of async
- CHAT_MESSAGE_TYPES to CHAT_MESSAGE_STYLES : roll removed
- Math.clamped to Math.clamp
- fixed debounce scope
This commit is contained in:
Vlyan
2024-05-24 12:30:02 +02:00
parent 2eead2f22f
commit bff5ed7865
5 changed files with 15 additions and 18 deletions

View File

@@ -211,7 +211,7 @@ Hooks.once("init", async () => {
const reverseBar = data.attribute === "fatigue" && game.settings.get(L5R5E.namespace, "token-reverseFatigueBar");
// Bar value
const pct = Math.clamped(Number(data.value), 0, data.max) / data.max;
const pct = Math.clamp(Number(data.value), 0, data.max) / data.max;
// Modify color
let color = number === 0 ? [pct / 1.2, 1 - pct, 0] : [0.5 * pct, 0.7 * pct, 0.5 + pct / 2];