fix(ui): star map info — hop merged into corridor line, bodies on one line
"CORE corridor (hop 1)" with sector color. Bodies back to single line "1 habitable · 1 inhabited" as originally formatted in the data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -477,20 +477,18 @@ func _rebuild_info_panel() -> void:
|
||||
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))
|
||||
_info_panel.add_component(ImplantDataRow.new("hop %d" % hop))
|
||||
|
||||
var sector_str: String = node.get("geographic_sector", "unknown").replace("_", " ").to_upper()
|
||||
var hop: int = int(node.get("hop_distance", 0))
|
||||
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))
|
||||
_info_panel.add_component(
|
||||
ImplantDataRow.new("%s corridor (hop %d)" % [sector_str, hop], sector_color)
|
||||
)
|
||||
|
||||
# Bodies — split "1 habitable · 1 inhabited" into separate lines
|
||||
# Bodies — single line
|
||||
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))
|
||||
_info_panel.add_component(ImplantDataRow.new(bodies))
|
||||
|
||||
# Population + GDP
|
||||
var population: String = node.get("population", "")
|
||||
|
||||
Reference in New Issue
Block a user