From 532707a75d478875b56f06b52506c84bacaa6bba Mon Sep 17 00:00:00 2001 From: cadowtin Date: Thu, 15 Aug 2024 01:31:35 -0500 Subject: [PATCH] Possible fix for some issies --- scripts/autoColorRing.js | 2 +- scripts/settings.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/autoColorRing.js b/scripts/autoColorRing.js index a39d1c7..934dac9 100644 --- a/scripts/autoColorRing.js +++ b/scripts/autoColorRing.js @@ -100,6 +100,6 @@ function getSetting(token, typeOrColor, ringOrBackground) { }?.[token.document.disposition] || "neutral"; return resolvePlayerWorldSetting( - `auto-coloring.${ringOrBackground}.${typeOrColor}.${type}` + `auto-coloring.${type}.${ringOrBackground}.${typeOrColor}` ); } diff --git a/scripts/settings.js b/scripts/settings.js index 9b2cf26..da95ba3 100644 --- a/scripts/settings.js +++ b/scripts/settings.js @@ -88,9 +88,9 @@ export function registerSettings() { "hostile.bg", "hidden.ring", "hidden.bg", - ].forEach((head) => { + ].forEach((type) => { ["type", "custom-color"].forEach((setting) => { - const def = getDefault(isPlayer, setting, type); + const def = getDefault(isPlayer, setting, type.split(".")[0]); const ty = setting === "type" ? String : new foundry.data.fields.ColorField(); const config = {