-
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
df-logger: TS->JS downgrade, V12 Compatibility
- Loading branch information
1 parent
ab16881
commit 7be92e6
Showing
9 changed files
with
174 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/// <reference path="../../../node_modules/fvtt-types/src/configuration/globals.d.mts" /> | ||
export default class SETTINGS { | ||
/** @type {string} */static MOD_NAME; | ||
/** @param {string} moduleName */ | ||
static init(moduleName) { | ||
this.MOD_NAME = moduleName; | ||
if (!String.prototype.localize) { | ||
String.prototype.localize = function () { | ||
return game.i18n.localize(this.valueOf()); | ||
}; | ||
} | ||
} | ||
/** | ||
* @param {string} key | ||
* @param {ClientSettings.SettingConfig} config | ||
*/ | ||
static register(key, config) { game.settings.register(SETTINGS.MOD_NAME, key, config); } | ||
/** | ||
* @param {string} key | ||
* @param {ClientSettings.SettingSubmenuConfig} config | ||
*/ | ||
static registerMenu(key, config) { game.settings.registerMenu(SETTINGS.MOD_NAME, key, config); } | ||
/** | ||
* @param {string} key | ||
* @returns {any} | ||
*/ | ||
static get(key) { return game.settings.get(SETTINGS.MOD_NAME, key); } | ||
/** | ||
* @param {string} key | ||
* @param {any} value | ||
* @returns {Promise<any>} | ||
*/ | ||
static async set(key, value) { return await game.settings.set(SETTINGS.MOD_NAME, key, value); } | ||
/** | ||
* @param {string} key | ||
* @returns {any} | ||
*/ | ||
static default(key) { return game.settings.settings.get(SETTINGS.MOD_NAME + '.' + key).default; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.