diff --git a/client/scripts/main.gd b/client/scripts/main.gd index 7d45d99a5..bcaf36ced 100644 --- a/client/scripts/main.gd +++ b/client/scripts/main.gd @@ -141,6 +141,13 @@ func _ready() -> void: debug_console.unpause_requested.connect(_on_dialogue_unpause_requested) +func _unhandled_key_input(event: InputEvent) -> void: + if event.is_pressed() and not event.is_echo(): + if event is InputEventKey and event.keycode == KEY_M: + if star_map: + star_map.toggle_visible() + + func _process(delta: float) -> void: # Main game loop: poll snapshot, apply state, flush input var snapshot: Variant = SimBridge.poll_snapshot() diff --git a/client/ui/star_map.gd b/client/ui/star_map.gd index 45721d58c..240802672 100644 --- a/client/ui/star_map.gd +++ b/client/ui/star_map.gd @@ -432,13 +432,8 @@ func _draw_info_panel(sz: Vector2) -> void: draw_string(font, Vector2(x, y), "Hop distance: " + str(node.get("hop_distance", "?")), HORIZONTAL_ALIGNMENT_LEFT, -1, 11, COLOR_TEXT_DIM) y += line_h - # Topology - var topo: String = node.get("gate_topology", "").replace("_", " ").capitalize() - draw_string(font, Vector2(x, y), "Topology: " + topo, HORIZONTAL_ALIGNMENT_LEFT, -1, 11, COLOR_TEXT_DIM) - y += line_h - # Gate connections - draw_string(font, Vector2(x, y), "Gates: " + str(node.get("aperture_count", 0)) + " apertures", HORIZONTAL_ALIGNMENT_LEFT, -1, 11, COLOR_TEXT_DIM) + draw_string(font, Vector2(x, y), "Gates: " + str(int(node.get("aperture_count", 0))) + " apertures", HORIZONTAL_ALIGNMENT_LEFT, -1, 11, COLOR_TEXT_DIM) func _draw_title() -> void: