feat(ui): economics monitor insert panel with placeholder data (#824)

New implant panel at implant/economics: system selector, 6-commodity
price table with trend indicators, GDP strip. Composed from D-169
component library. Ring buffer caches last 20 ticks per system.
Snapshot routing wired through snapshot_handler → GameState →
snapshot_consumers → economics_panel. Placeholder prices shown
until server ships EconomySnapshot (#822).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-10 13:22:20 +02:00
co-authored by Claude Opus 4.6
parent 766da969de
commit 949d721eac
8 changed files with 387 additions and 2 deletions
+12
View File
@@ -17,6 +17,7 @@ var interaction_list: Node = null
var interaction_prompt: Node = null
var minimap: Node = null
var star_map: Node = null
var economics_panel: Node = null # #824: economics monitor (D-181)
var _screen_flash_fn: Callable # Callable(color: Color, duration: float)
@@ -37,6 +38,7 @@ func init(refs: Dictionary, screen_flash: Callable) -> SnapshotConsumers:
interaction_prompt = refs.get("interaction_prompt")
minimap = refs.get("minimap")
star_map = refs.get("star_map")
economics_panel = refs.get("economics_panel")
_screen_flash_fn = screen_flash
return self
@@ -54,6 +56,8 @@ func propagate_insert_state() -> void:
minimap.set_insert_active(insert_state)
if star_map:
star_map.set_insert_active(insert_state)
if economics_panel:
economics_panel.set_insert_active(insert_state)
# D-057: Update interaction list from game state.
@@ -173,6 +177,14 @@ func consume_debug_response() -> void:
GameState.debug_response = null
# #824: Forward economy_snapshot from server to the economics panel (D-181).
func consume_economy_snapshot() -> void:
if GameState.economy_snapshot == null or not economics_panel:
return
if economics_panel.has_method("receive_economy_data"):
economics_panel.receive_economy_data(GameState.economy_snapshot)
# #174: Consume examine result — show overlay when server sends character-filtered observation.
func consume_examine_result() -> void:
if GameState.current_examine_result == null or not examine_display: