diff --git a/oath-hammer.mjs b/oath-hammer.mjs index 8aa3dc9..4f10480 100644 --- a/oath-hammer.mjs +++ b/oath-hammer.mjs @@ -139,6 +139,9 @@ Hooks.once("ready", async function () { await item.delete() } } + + // Auto-import the welcome scene if GM and not already present + if (game.user.isGM) await _importWelcomeScene() }) // Auto-link regiment (and army) actor tokens so they can be added to garrisons/armies @@ -167,3 +170,33 @@ Hooks.on("renderChatMessageHTML", (message, html) => { // Inject Free Roll bar into the chat sidebar Hooks.on("renderChatLog", (_chatLog, html) => injectFreeRollBar(_chatLog, html)) + +// ============================================================ +// WELCOME SCENE — auto-create on first world load (GM only) +// ============================================================ +const WELCOME_SCENE_NAME = "Oath Hammer" +const WELCOME_SCENE_MAP = "systems/fvtt-oath-hammer/assets/images/oathhammer_map.webp" + +/** Scene data for the welcome map (3600×5400 px, no grid — world map). */ +function _welcomeSceneData() { + return { + name: WELCOME_SCENE_NAME, + background: { src: WELCOME_SCENE_MAP }, + width: 3600, + height: 5400, + grid: { type: 0, size: 100 }, // gridless + padding: 0, + initial: { x: 1800, y: 2700, scale: 0.25 }, + tokenVision: false, + flags: { "fvtt-oath-hammer": { welcomeScene: true } }, + } +} + +async function _importWelcomeScene() { + // Skip if the scene already exists in the world + if (game.scenes.find(s => s.name === WELCOME_SCENE_NAME)) return + console.info("Oath Hammer | Creating welcome scene…") + const scene = await Scene.create(_welcomeSceneData()) + await scene.activate() + console.info("Oath Hammer | Welcome scene created and activated.") +} diff --git a/package.json b/package.json index a332e58..ae1fafe 100644 --- a/package.json +++ b/package.json @@ -8,14 +8,18 @@ "watch": "gulp watch" }, "devDependencies": { + "autoprefixer": "^10.4.20", + "classic-level": "^1.4.1", "gulp": "^4.0.2", "gulp-less": "^5.0.0", - "less": "^4.2.0", - "autoprefixer": "^10.4.20", "gulp-postcss": "^9.0.1", + "less": "^4.2.0", "postcss": "^8.4.49" }, - "keywords": ["foundry-vtt", "oath-hammer"], + "keywords": [ + "foundry-vtt", + "oath-hammer" + ], "author": "", "license": "ISC" } diff --git a/packs/scenes/000014.log b/packs/scenes/000014.log new file mode 100644 index 0000000..e69de29 diff --git a/packs/scenes/000016.ldb b/packs/scenes/000016.ldb new file mode 100644 index 0000000..7a81cac Binary files /dev/null and b/packs/scenes/000016.ldb differ diff --git a/packs/scenes/CURRENT b/packs/scenes/CURRENT new file mode 100644 index 0000000..ef20c6d --- /dev/null +++ b/packs/scenes/CURRENT @@ -0,0 +1 @@ +MANIFEST-000012 diff --git a/packs/scenes/MANIFEST-000012 b/packs/scenes/MANIFEST-000012 new file mode 100644 index 0000000..84f0a9b Binary files /dev/null and b/packs/scenes/MANIFEST-000012 differ diff --git a/system.json b/system.json index d152a08..b07d7c2 100644 --- a/system.json +++ b/system.json @@ -3,6 +3,12 @@ "title": "Oath Hammer RPG", "description": "Oath Hammer RPG System for FoundryVTT", "version": "14.0.0", + "authors": [ + { + "name": "Uberwald", + "url": "https://www.uberwald.me/gitea/uberwald/fvtt-oath-hammer" + } + ], "compatibility": { "minimum": "13", "verified": "14" @@ -151,5 +157,19 @@ }, "url": "https://www.uberwald.me/gitea/uberwald/fvtt-oath-hammer", "manifest": "https://www.uberwald.me/gitea/public/fvtt-oath-hammer/releases/download/latest/system.json", - "download": "https://www.uberwald.me/gitea/public/fvtt-oath-hammer/releases/download/latest/fvtt-oath-hammer.zip" + "download": "https://www.uberwald.me/gitea/public/fvtt-oath-hammer/releases/download/latest/fvtt-oath-hammer.zip", + "packs": [ + { + "label": "Scenes", + "type": "Scene", + "name": "scenes", + "path": "packs/scenes", + "system": "fvtt-oath-hammer", + "flags": {}, + "ownership": { + "PLAYER": "OBSERVER", + "ASSISTANT": "OWNER" + } + } + ] }