-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d43604f
commit cd1b4d5
Showing
6 changed files
with
74 additions
and
19 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
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,45 @@ | ||
Hooks.once('init', function () { | ||
game.settings.register("colorsettings", "showWarning", { | ||
config: true, | ||
type: Boolean, | ||
default: true, | ||
name: "Show Error", | ||
hint: "Enable or disable error if main module missing." | ||
}); | ||
if (window?.Ardittristan?.initialColorSettingRun === undefined) { | ||
if (game.modules.has("colorsettings")) { | ||
if (game.modules.get("colorsettings").active) { | ||
return; | ||
} else { | ||
game.settings.register("colorsettings", "autoEnable", { | ||
config: false, | ||
type: Boolean, | ||
default: true | ||
}); | ||
Hooks.once("canvasReady", () => { | ||
if (game.user.isGM && game.settings.get("colorsettings", "autoEnable")) { | ||
Dialog.confirm({ | ||
title: "Enable Color Settings module?", | ||
content: "<p>You seem to have Color Settings installed already, do you want to enable it?</p>", | ||
yes: () => game.settings.set("core", ModuleManagement.CONFIG_SETTING, { | ||
...game.settings.get("core", ModuleManagement.CONFIG_SETTING), | ||
...{ colorsettings: true } | ||
}), | ||
no: () => game.settings.set("colorsettings", "autoEnable", false), | ||
defaultYes: false | ||
}); | ||
|
||
} | ||
}); | ||
} | ||
} | ||
|
||
Hooks.once('ready', function () { | ||
if (game.settings.get("colorsettings", "showWarning")) { | ||
ui.notifications.notify("A module is missing the color picker library. For best results, please install and enable the Lib-Color Settings module.", "warning"); | ||
} | ||
}); | ||
console.log("ColorSettings | initializing fallback mode"); | ||
|
||
} | ||
}); |
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