From 5400044afe24ba6d0e3ffe2a4e637e924b011779 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sun, 5 Apr 2026 11:57:49 +0200 Subject: [PATCH] =?UTF-8?q?feat(ui):=20star=20map=20info=20panel=20?= =?UTF-8?q?=E2=80=94=20one=20item=20per=20line,=20GDP=20placeholder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- client/ui/star_map.gd | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/client/ui/star_map.gd b/client/ui/star_map.gd index 89c04b6a1..504beb10a 100644 --- a/client/ui/star_map.gd +++ b/client/ui/star_map.gd @@ -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", "")