feat(ui): star map info panel — one item per line, GDP placeholder

Layout now shows each field on its own line:
  star type / hop / corridor / habitable / inhabited / pop / GDP
GDP shows "—" placeholder until economics data is available.
Population shows full number without ellipsis.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-05 11:57:49 +02:00
co-authored by Claude Opus 4.6
parent 34a21d4cd0
commit 5400044afe
+15 -22
View File
@@ -475,36 +475,29 @@ func _rebuild_info_panel() -> void:
# ── Stats ────────────────────────────────────────────────────────────────
var star_type: String = node.get("star_type", "")
if not star_type.is_empty():
_info_panel.add_component(ImplantDataRow.new(star_type + " star"))
var hop: int = int(node.get("hop_distance", 0))
var stat_line_1: String
if star_type.is_empty():
stat_line_1 = "Hop %d from Gateway" % hop
else:
stat_line_1 = "%s star · hop %d" % [star_type, hop]
_info_panel.add_component(ImplantDataRow.new(stat_line_1))
_info_panel.add_component(ImplantDataRow.new("hop %d" % hop))
var sector_str: String = node.get("geographic_sector", "unknown").replace("_", " ").to_upper()
var sector_color: Color = SECTOR_COLORS.get(node.get("geographic_sector", ""), COLOR_TEXT_DIM)
_info_panel.add_component(ImplantDataRow.new(sector_str + " corridor", sector_color))
# Bodies — split "1 habitable · 1 inhabited" into separate lines
var bodies: String = node.get("bodies", "")
if not bodies.is_empty():
for part: String in bodies.split("·"):
var trimmed := part.strip_edges()
if not trimmed.is_empty():
_info_panel.add_component(ImplantDataRow.new(trimmed))
# Population + GDP
var population: String = node.get("population", "")
var stat_line_3: String
if not bodies.is_empty() and not population.is_empty():
stat_line_3 = "%s · pop %s" % [bodies, population]
elif not bodies.is_empty():
stat_line_3 = bodies
elif not population.is_empty():
stat_line_3 = "Population: " + population
else:
stat_line_3 = (
"%d aperture%s"
% [
int(node.get("aperture_count", 0)),
"s" if int(node.get("aperture_count", 0)) != 1 else ""
]
)
_info_panel.add_component(ImplantDataRow.new(stat_line_3))
if not population.is_empty():
_info_panel.add_component(ImplantDataRow.new("")) # blank line spacer
_info_panel.add_component(ImplantDataRow.new("pop " + population))
_info_panel.add_component(ImplantDataRow.new("GDP —"))
# ── GTTR excerpt ─────────────────────────────────────────────────────────
var gttr: String = node.get("gttr_excerpt", "")