about summary refs log tree commit diff stats
path: root/apworld/client/textclient.gd
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-09-29 12:31:01 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2025-09-29 12:31:01 -0400
commit99191f3aa87b2362516971c1fdd64d21b16f87b7 (patch)
tree336a0fff582e0709f7cc60b3e46fff5f10d6b649 /apworld/client/textclient.gd
parent91f829a193b9fd7686bd401bc0704f26bf75dafc (diff)
downloadlingo2-archipelago-99191f3aa87b2362516971c1fdd64d21b16f87b7.tar.gz
lingo2-archipelago-99191f3aa87b2362516971c1fdd64d21b16f87b7.tar.bz2
lingo2-archipelago-99191f3aa87b2362516971c1fdd64d21b16f87b7.zip
Show when goal is reachable in tracker
Diffstat (limited to 'apworld/client/textclient.gd')
-rw-r--r--apworld/client/textclient.gd15
1 files changed, 15 insertions, 0 deletions
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
10var locations_overlay 10var locations_overlay
11var location_texture 11var location_texture
12var worldport_texture 12var worldport_texture
13var goal_texture
13 14
14var worldports_tab 15var worldports_tab
15var worldports_tree 16var worldports_tree
@@ -116,6 +117,10 @@ func _ready():
116 worldport_image.load_png_from_buffer(runtime.read_path("assets/worldport.png")) 117 worldport_image.load_png_from_buffer(runtime.read_path("assets/worldport.png"))
117 worldport_texture = ImageTexture.create_from_image(worldport_image) 118 worldport_texture = ImageTexture.create_from_image(worldport_image)
118 119
120 var goal_image = Image.new()
121 goal_image.load_png_from_buffer(runtime.read_path("assets/goal.png"))
122 goal_texture = ImageTexture.create_from_image(goal_image)
123
119 124
120func _input(event): 125func _input(event):
121 if global.loaded and event is InputEventKey and event.pressed: 126 if global.loaded and event is InputEventKey and event.pressed:
@@ -179,6 +184,7 @@ func update_locations():
179 184
180 const kLocation = 0 185 const kLocation = 0
181 const kWorldport = 1 186 const kWorldport = 1
187 const kGoal = 2
182 188
183 var location_names = [] 189 var location_names = []
184 var type_by_name = {} 190 var type_by_name = {}
@@ -196,6 +202,13 @@ func update_locations():
196 202
197 location_names.sort() 203 location_names.sort()
198 204
205 if ap.client._goal_accessible:
206 var location_name = gamedata.ending_display_name_by_name[ap.kEndingNameByVictoryValue[
207 ap.victory_condition
208 ]]
209 location_names.push_front(location_name)
210 type_by_name[location_name] = kGoal
211
199 var count = 0 212 var count = 0
200 for location_name in location_names: 213 for location_name in location_names:
201 tracker_label.append_text("[p]%s[/p]" % location_name) 214 tracker_label.append_text("[p]%s[/p]" % location_name)
@@ -207,6 +220,8 @@ func update_locations():
207 locations_overlay.add_image(location_texture) 220 locations_overlay.add_image(location_texture)
208 elif type_by_name[location_name] == kWorldport: 221 elif type_by_name[location_name] == kWorldport:
209 locations_overlay.add_image(worldport_texture) 222 locations_overlay.add_image(worldport_texture)
223 elif type_by_name[location_name] == kGoal:
224 locations_overlay.add_image(goal_texture)
210 locations_overlay.pop() 225 locations_overlay.pop()
211 count += 1 226 count += 1
212 227