This commit is contained in:
+5
-1
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
import { ACTOR_TYPES, ITEM_TYPES, MAGICS, SUBTYPES, SYSTEM_ID } from "./config/constants.js"
|
||||
import { registerSettings, migrateIfNeeded } from "./config/settings.js"
|
||||
import { registerSettings, migrateIfNeeded, loadWelcomeSceneIfNeeded } from "./config/settings.js"
|
||||
import { preLocalizeConfig } from "./config/localize.js"
|
||||
import { configureRuntime } from "./config/runtime.js"
|
||||
import { CharacterDataModel, NpcDataModel } from "./data/actors/index.js"
|
||||
@@ -30,6 +30,7 @@ import { CDETinjiApp } from "./ui/apps/tinji-app.js"
|
||||
import { CDEWheelApp } from "./ui/apps/wheel-app.js"
|
||||
import { injectRollActions, refreshAllRollActions } from "./ui/roll-actions.js"
|
||||
import { CDECombat } from "./documents/combat.js"
|
||||
import { showWelcomeMessage, injectWelcomeActions } from "./ui/apps/welcome.js"
|
||||
|
||||
Hooks.once("i18nInit", preLocalizeConfig)
|
||||
|
||||
@@ -130,7 +131,9 @@ Hooks.once("init", async () => {
|
||||
|
||||
Hooks.once("ready", async () => {
|
||||
await migrateIfNeeded()
|
||||
await loadWelcomeSceneIfNeeded()
|
||||
CDEWheelApp.registerHooks()
|
||||
if (game.user.isGM) showWelcomeMessage()
|
||||
})
|
||||
|
||||
/** Add Loksyu + Tin Ji quick-access buttons to the chat panel (FoundryVTT v13) */
|
||||
@@ -173,6 +176,7 @@ Hooks.on("renderChatLog", (_app, html) => {
|
||||
/** Inject Loksyu / TinJi action buttons into roll-result chat messages */
|
||||
Hooks.on("renderChatMessageHTML", (message, html) => {
|
||||
injectRollActions(message, html)
|
||||
if (message.flags?.[SYSTEM_ID]?.welcome) injectWelcomeActions(message, html)
|
||||
})
|
||||
|
||||
/** Refresh all visible roll-result buttons whenever Loksyu or TinJi settings change */
|
||||
|
||||
Reference in New Issue
Block a user