5 Commits

Author SHA1 Message Date
a6c2aa5309 Merge pull request 'fix: Keep ROCK tile after surface rock mining (Issue #48)' (#49) from fix/rock-tile-preserved into master 2026-03-24 19:56:13 +00:00
3bf143993e 🐛 keep ROCK tile type after surface rock mining
CHANGE_TILE ROCK→GRASS removed from the surface-rock harvest branch.
Empty ROCK tiles are now passable (no resource on them) but remain ROCK,
so the mine building can still be placed on harvested rock ground.

Fixes #48

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 19:28:57 +00:00
0a706b8def Merge pull request 'Fix: Debug-Panel (F3) weicht Nisse-Info-Panel aus (#41)' (#44) from fix/debug-panel-overlap-41 into master 2026-03-24 18:42:55 +00:00
ae6c14d9a1 🐛 reposition debug panel when Nisse info panel is open (#41)
Debug panel shifts below the Nisse info panel to avoid overlap.
repositionDebugPanel() is called on toggle, open, and close.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 17:16:17 +00:00
3e099d92e2 Merge pull request 'Fix: uiOpacity auf Stockpile und Action Bar vereinheitlicht (#39, #40)' (#43) from fix/ui-opacity-panels into master 2026-03-24 17:14:50 +00:00
3 changed files with 17 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased] ## [Unreleased]
### Fixed ### Fixed
- **Debug-Panel überlagert Nisse-Info-Panel** (Issue #41): F3-Debug-Panel weicht dynamisch aus — wenn das Nisse-Info-Panel offen ist, erscheint das Debug-Panel unterhalb davon statt darüber
- **Stockpile-Overlay Transparenz** (Issue #39): `updateStaticPanelOpacity()` verwendete `setAlpha()` statt `setFillStyle()` — dadurch wurde die Opacity quadratisch statt linear angewendet; bei 100 % blieb das Panel sichtbar transparent - **Stockpile-Overlay Transparenz** (Issue #39): `updateStaticPanelOpacity()` verwendete `setAlpha()` statt `setFillStyle()` — dadurch wurde die Opacity quadratisch statt linear angewendet; bei 100 % blieb das Panel sichtbar transparent
- **Action Bar Transparenz** (Issue #40): Action Bar ignorierte `uiOpacity` komplett — Hintergrund war hardcoded auf 0.92; wird jetzt korrekt mit `uiOpacity` erstellt und per `updateStaticPanelOpacity()` live aktualisiert - **Action Bar Transparenz** (Issue #40): Action Bar ignorierte `uiOpacity` komplett — Hintergrund war hardcoded auf 0.92; wird jetzt korrekt mit `uiOpacity` erstellt und per `updateStaticPanelOpacity()` live aktualisiert

View File

@@ -405,7 +405,7 @@ export class UIScene extends Phaser.Scene {
/** Creates the debug panel text object (initially hidden). */ /** Creates the debug panel text object (initially hidden). */
private createDebugPanel(): void { private createDebugPanel(): void {
const hexAlpha = Math.round(this.uiOpacity * 255).toString(16).padStart(2, '0') const hexAlpha = Math.round(this.uiOpacity * 255).toString(16).padStart(2, '0')
this.debugPanelText = this.add.text(10, 80, '', { this.debugPanelText = this.add.text(10, 10, '', {
fontSize: '12px', fontSize: '12px',
color: '#cccccc', color: '#cccccc',
backgroundColor: `#000000${hexAlpha}`, backgroundColor: `#000000${hexAlpha}`,
@@ -419,9 +419,20 @@ export class UIScene extends Phaser.Scene {
private toggleDebugPanel(): void { private toggleDebugPanel(): void {
this.debugActive = !this.debugActive this.debugActive = !this.debugActive
this.debugPanelText.setVisible(this.debugActive) this.debugPanelText.setVisible(this.debugActive)
this.repositionDebugPanel()
this.scene.get('Game').events.emit('debugToggle') this.scene.get('Game').events.emit('debugToggle')
} }
/**
* Repositions the debug panel to avoid overlapping the Nisse info panel.
* When the Nisse info panel is open, the debug panel shifts below it.
*/
private repositionDebugPanel(): void {
const NISSE_PANEL_H = 120 + 10 * 14 + 16 // matches buildNisseInfoPanel: 276px
const debugY = this.nisseInfoVisible ? 10 + NISSE_PANEL_H + 10 : 10
this.debugPanelText.setY(debugY)
}
/** /**
* Reads current debug data from DebugSystem and updates the panel text. * Reads current debug data from DebugSystem and updates the panel text.
* Called every frame while debug mode is active. * Called every frame while debug mode is active.
@@ -879,6 +890,7 @@ export class UIScene extends Phaser.Scene {
this.nisseInfoId = villagerId this.nisseInfoId = villagerId
this.nisseInfoVisible = true this.nisseInfoVisible = true
this.buildNisseInfoPanel() this.buildNisseInfoPanel()
this.repositionDebugPanel()
} }
/** Closes and destroys the Nisse info panel. */ /** Closes and destroys the Nisse info panel. */
@@ -888,6 +900,7 @@ export class UIScene extends Phaser.Scene {
this.nisseInfoId = null this.nisseInfoId = null
this.nisseInfoGroup.destroy(true) this.nisseInfoGroup.destroy(true)
this.nisseInfoGroup = this.add.group() this.nisseInfoGroup = this.add.group()
this.repositionDebugPanel()
} }
/** /**

View File

@@ -296,7 +296,8 @@ export class VillagerSystem {
const res = state.world.resources[job.targetId] const res = state.world.resources[job.targetId]
if (res) { if (res) {
this.adapter.send({ type: 'VILLAGER_HARVEST_RESOURCE', villagerId: v.id, resourceId: job.targetId }) this.adapter.send({ type: 'VILLAGER_HARVEST_RESOURCE', villagerId: v.id, resourceId: job.targetId })
this.adapter.send({ type: 'CHANGE_TILE', tileX: res.tileX, tileY: res.tileY, tile: TileType.GRASS }) // ROCK tile stays ROCK after mining — empty rocky ground remains passable
// and valid for mine building placement.
this.worldSystem.removeResourceTile(res.tileX, res.tileY) this.worldSystem.removeResourceTile(res.tileX, res.tileY)
this.resourceSystem.removeResource(job.targetId) this.resourceSystem.removeResource(job.targetId)
this.addLog(v.id, '✓ Mined rock (+2 stone)') this.addLog(v.id, '✓ Mined rock (+2 stone)')