Fix template load bug and rename main script file
- Updated `module.json` to reflect version change from 0.5.2 to 0.5.3. - Renamed `main.js` to `asc-session-title-suggestions.js` for better clarity and consistency. - Modified script path in `module.json` to align with the new file name. - Refactored template loading logic to consolidate into a single call, improving code readability.
This commit is contained in:
@@ -20,11 +20,11 @@
|
|||||||
"path": "lang/en.json"
|
"path": "lang/en.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"download": "https://github.com/anthonyscorrea/asc-session-title-suggestions/releases/download/0.5.2/module.zip",
|
"download": "https://github.com/anthonyscorrea/asc-session-title-suggestions/releases/download/0.5.3/module.zip",
|
||||||
"manifest": "https://github.com/anthonyscorrea/asc-session-title-suggestions/releases/latest/download/module.json",
|
"manifest": "https://github.com/anthonyscorrea/asc-session-title-suggestions/releases/latest/download/module.json",
|
||||||
"version": "0.5.2",
|
"version": "0.5.3",
|
||||||
"scripts": [
|
"scripts": [
|
||||||
"scripts/main.js"
|
"scripts/asc-session-title-suggestions.js"
|
||||||
],
|
],
|
||||||
"esmodules":[
|
"esmodules":[
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -101,8 +101,10 @@ function registerCustomChatCommands() {
|
|||||||
Hooks.on("init", function() {
|
Hooks.on("init", function() {
|
||||||
//This code runs once the Foundry VTT software begins its initialization workflow
|
//This code runs once the Foundry VTT software begins its initialization workflow
|
||||||
registerClipboardCopyButton();
|
registerClipboardCopyButton();
|
||||||
Object.values(TEMPLATES.suggestion).forEach((template_path)=>loadTemplates(template_path))
|
loadTemplates([
|
||||||
Object.values(TEMPLATES.suggestionList).forEach((template_path)=>loadTemplates(template_path))
|
...Object.values(TEMPLATES.suggestion),
|
||||||
|
...Object.values(TEMPLATES.suggestionList)
|
||||||
|
])
|
||||||
game.settings.register("asc-session-title-suggestions", "titleListCommandRole", {
|
game.settings.register("asc-session-title-suggestions", "titleListCommandRole", {
|
||||||
name: game.i18n.localize("SESSION_TITLE_SUGGESTIONS.SETTING_ROLE_NAME"),
|
name: game.i18n.localize("SESSION_TITLE_SUGGESTIONS.SETTING_ROLE_NAME"),
|
||||||
scope: "world",
|
scope: "world",
|
||||||
Reference in New Issue
Block a user