Add first iteration of the Image DB editor

This commit is contained in:
Oliver 2026-01-18 23:34:24 -07:00
parent 773c506570
commit c7c02702d7
13 changed files with 425 additions and 7 deletions

View file

@ -4,8 +4,18 @@ export const __ID__ = `token-browser`;
* @param {string} path
*/
export function filePath(path) {
if (path.startsWith(`modules/${__ID__}/`)) {
return path;
};
if (path.startsWith(`/`)) {
path = path.slice(1);
};
return `modules/${__ID__}/${path}`;
};
let _devMode;
export function devMode() {
if (_devMode != null) { return _devMode };
_devMode = game.modules.get(__ID__).flags.inDev ?? false;
return _devMode;
};