Update the turn marker settings on first load
This commit is contained in:
parent
463b0c4553
commit
26534ec0ca
4 changed files with 20 additions and 0 deletions
BIN
assets/turn-marker.png
Normal file
BIN
assets/turn-marker.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 231 KiB |
|
|
@ -103,6 +103,7 @@ Hooks.once(`init`, () => {
|
|||
|
||||
// #region Token Attrs
|
||||
CONFIG.Actor.trackableAttributes.hero = HeroData.trackableAttributes;
|
||||
// #endregion
|
||||
|
||||
registerCustomComponents();
|
||||
Handlebars.registerHelper(helpers);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -30,4 +30,11 @@ export function registerMetaSettings() {
|
|||
await ui.combat.render({ parts: [ `tracker` ] });
|
||||
},
|
||||
});
|
||||
|
||||
game.settings.register(`ripcrypt`, `firstLoadFinished`, {
|
||||
scope: `world`,
|
||||
type: Boolean,
|
||||
initial: false,
|
||||
requiresReload: false,
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue