✨ add mine building for automated stone production
- New 3×2 building placeable only on ROCK tiles without resources (50 stone + 200 wood) - Mine entrance at bottom-centre tile (tileX+1, tileY+1) — only passable tile - Other 5 footprint tiles blocked via resourceTiles index (impassable ROCK) - Nisse with mine priority > 0 walk to entrance, hide inside for MINE_WORK_MS (15 s), then reappear carrying MINE_STONE_YIELD (2) stone and haul to stockpile - Up to MINE_CAPACITY (3) Nisse work simultaneously; overflow Nisse wait for a slot - ⛏ X/3 world-space status label above building updated each frame - Surface rock harvesting unchanged; mine buildings take precedence in pickJob - Ghost resizes to 3×2 when mine is selected; placement validated across full footprint - Mine added to build menu with cost and placement hint Closes #42 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -229,9 +229,10 @@ export class UIScene extends Phaser.Scene {
|
||||
{ kind: 'bed', label: '🛏 Bed', cost: '6 wood (+1 villager)' },
|
||||
{ kind: 'stockpile_zone', label: '📦 Stockpile', cost: 'free (workers deliver here)' },
|
||||
{ kind: 'forester_hut', label: '🌲 Forester Hut', cost: '50 wood' },
|
||||
{ kind: 'mine', label: '⛏ Mine', cost: '200 wood + 50 stone (place on ROCK)' },
|
||||
]
|
||||
const menuX = this.scale.width / 2 - 150, menuY = this.scale.height / 2 - 168
|
||||
const bg = this.add.rectangle(menuX, menuY, 300, 326, 0x000000, this.uiOpacity).setOrigin(0,0).setScrollFactor(0).setDepth(200)
|
||||
const menuX = this.scale.width / 2 - 150, menuY = this.scale.height / 2 - 186
|
||||
const bg = this.add.rectangle(menuX, menuY, 300, 372, 0x000000, this.uiOpacity).setOrigin(0,0).setScrollFactor(0).setDepth(200)
|
||||
this.buildMenuGroup.add(bg)
|
||||
this.buildMenuGroup.add(this.add.text(menuX + 150, menuY + 14, 'BUILD MENU [B/ESC]', { fontSize: '11px', color: '#aaaaaa', fontFamily: 'monospace' }).setOrigin(0.5,0).setScrollFactor(0).setDepth(201))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user