Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 36cb3bc755 | |||
| d71077d033 |
@@ -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.")
|
||||
}
|
||||
|
||||
10
package.json
10
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"
|
||||
}
|
||||
|
||||
BIN
packs/scenes/000016.ldb
Normal file
BIN
packs/scenes/000016.ldb
Normal file
Binary file not shown.
0
packs/scenes/000019.log
Normal file
0
packs/scenes/000019.log
Normal file
1
packs/scenes/CURRENT
Normal file
1
packs/scenes/CURRENT
Normal file
@@ -0,0 +1 @@
|
||||
MANIFEST-000017
|
||||
BIN
packs/scenes/MANIFEST-000017
Normal file
BIN
packs/scenes/MANIFEST-000017
Normal file
Binary file not shown.
22
system.json
22
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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user