This commit is contained in:
walcutt 2025-01-28 21:31:05 -05:00
parent 996c59ef12
commit 839d3632ab
2 changed files with 7 additions and 2 deletions

View File

@ -107,7 +107,7 @@ Hooks.once("init", () => {
game.settings.register('hench', 'version', {
name: 'Version',
scope: 'world',
config: true,
config: false,
type: String,
});
});
@ -118,6 +118,7 @@ Hooks.once("ready", () => {
// TODO: don't alert on null/undefined after draft 1 cut.
if(existingVersion !== CURRENT_VERSION) {
console.log(`Showing warnings from ${existingVersion} -> ${CURRENT_VERSION}`);
showUpdateWarningDialogue(existingVersion);
}

View File

@ -1,5 +1,7 @@
export const versions = {
UNDEFINED: '',
EMPTY: '',
NULL: null,
UNDEFINED: undefined,
DRAFT_0: '0',
DRAFT_1: '1',
};
@ -8,6 +10,8 @@ export const CURRENT_VERSION = versions.DRAFT_1;
const updateMap = {
[versions.UNDEFINED]: versions.DRAFT_0,
[versions.EMPTY]: versions.DRAFT_0,
[versions.NULL]: versions.DRAFT_0,
[versions.DRAFT_0]: versions.DRAFT_1,
};