Update the turn marker settings on first load

This commit is contained in:
Oliver-Akins 2025-02-15 02:10:32 -07:00
parent 463b0c4553
commit 26534ec0ca
4 changed files with 20 additions and 0 deletions

View file

@ -103,6 +103,7 @@ Hooks.once(`init`, () => {
// #region Token Attrs
CONFIG.Actor.trackableAttributes.hero = HeroData.trackableAttributes;
// #endregion
registerCustomComponents();
Handlebars.registerHelper(helpers);

View file

@ -1,3 +1,4 @@
import { filePath } from "../consts.mjs";
import { Logger } from "../utils/Logger.mjs";
Hooks.once(`ready`, () => {
@ -21,4 +22,15 @@ Hooks.once(`ready`, () => {
if (game.settings.get(`ripcrypt`, `showDelveTour`)) {
ui.crypt.render({ force: true });
};
// MARK: 1-time updates
if (!game.settings.get(`ripcrypt`, `firstLoadFinished`)) {
// Update the turnMarker to be the RipCrypt defaults
const combatConfig = game.settings.get(`core`, `combatTrackerConfig`);
combatConfig.turnMarker.src = filePath(`assets/turn-marker.png`);
combatConfig.turnMarker.animation = `spinPulse`;
game.settings.set(`core`, `combatTrackerConfig`, combatConfig);
}
game.settings.set(`ripcrypt`, `firstLoadFinished`, true);
});