FIx map
Release Creation / build (release) Successful in 40s

This commit is contained in:
2026-06-02 19:44:57 +02:00
parent 53b7e8cc9d
commit 2fb6bfe444
54 changed files with 247 additions and 170 deletions
+26 -1
View File
@@ -75,8 +75,33 @@ Hooks.once("setup", () => {
localizeSystemConfig()
})
Hooks.once("ready", () => {
Hooks.once("ready", async () => {
console.info(`${SYSTEM_ID} | Ready`)
if (!game.user.isGM) return
if (game.scenes.getName("Map")) return
const pack = game.packs.get("fvtt-machine-gods-noxian-expanse.scenes")
if (!pack) {
console.warn(`${SYSTEM_ID} | Scenes compendium not found`)
return
}
const index = await pack.getIndex()
const entry = index.find(s => s.name === "Map")
if (!entry) {
console.warn(`${SYSTEM_ID} | Map scene not found in compendium`)
return
}
const doc = await pack.getDocument(entry._id)
if (doc) {
const scene = await Scene.create(doc.toObject(), { keepId: false })
if (scene) {
await scene.activate()
}
}
})
Hooks.on("deleteCombat", (combat) => {