From 99191f3aa87b2362516971c1fdd64d21b16f87b7 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 29 Sep 2025 12:31:01 -0400 Subject: Show when goal is reachable in tracker --- apworld/client/textclient.gd | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'apworld/client/textclient.gd') diff --git a/apworld/client/textclient.gd b/apworld/client/textclient.gd index 0c4e675..530eddb 100644 --- a/apworld/client/textclient.gd +++ b/apworld/client/textclient.gd @@ -10,6 +10,7 @@ var is_open = false var locations_overlay var location_texture var worldport_texture +var goal_texture var worldports_tab var worldports_tree @@ -116,6 +117,10 @@ func _ready(): worldport_image.load_png_from_buffer(runtime.read_path("assets/worldport.png")) worldport_texture = ImageTexture.create_from_image(worldport_image) + var goal_image = Image.new() + goal_image.load_png_from_buffer(runtime.read_path("assets/goal.png")) + goal_texture = ImageTexture.create_from_image(goal_image) + func _input(event): if global.loaded and event is InputEventKey and event.pressed: @@ -179,6 +184,7 @@ func update_locations(): const kLocation = 0 const kWorldport = 1 + const kGoal = 2 var location_names = [] var type_by_name = {} @@ -196,6 +202,13 @@ func update_locations(): location_names.sort() + if ap.client._goal_accessible: + var location_name = gamedata.ending_display_name_by_name[ap.kEndingNameByVictoryValue[ + ap.victory_condition + ]] + location_names.push_front(location_name) + type_by_name[location_name] = kGoal + var count = 0 for location_name in location_names: tracker_label.append_text("[p]%s[/p]" % location_name) @@ -207,6 +220,8 @@ func update_locations(): locations_overlay.add_image(location_texture) elif type_by_name[location_name] == kWorldport: locations_overlay.add_image(worldport_texture) + elif type_by_name[location_name] == kGoal: + locations_overlay.add_image(goal_texture) locations_overlay.pop() count += 1 -- cgit 1.4.1