about summary refs log tree commit diff stats
path: root/apworld/client/manager.gd
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-11-02 12:29:29 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2025-11-02 12:29:29 -0500
commitadfc639965b2bda776ceb0a20840438e31f82d58 (patch)
treeb31b6896dee65b66595e648139ba4e047258847b /apworld/client/manager.gd
parenta5dc6b35da0a790b59940992d2cb175c35946f19 (diff)
downloadlingo2-archipelago-adfc639965b2bda776ceb0a20840438e31f82d58.tar.gz
lingo2-archipelago-adfc639965b2bda776ceb0a20840438e31f82d58.tar.bz2
lingo2-archipelago-adfc639965b2bda776ceb0a20840438e31f82d58.zip
Allow ignoring locations in tracker
Diffstat (limited to 'apworld/client/manager.gd')
-rw-r--r--apworld/client/manager.gd17
1 files changed, 17 insertions, 0 deletions
diff --git a/apworld/client/manager.gd b/apworld/client/manager.gd index 727d17a..b7bb5fd 100644 --- a/apworld/client/manager.gd +++ b/apworld/client/manager.gd
@@ -29,6 +29,7 @@ var _inverse_item_locks = {}
29var _held_letters = {} 29var _held_letters = {}
30var _letters_setup = false 30var _letters_setup = false
31var _already_connected = false 31var _already_connected = false
32var _ignored_locations = []
32 33
33const kSHUFFLE_LETTERS_VANILLA = 0 34const kSHUFFLE_LETTERS_VANILLA = 0
34const kSHUFFLE_LETTERS_UNLOCKED = 1 35const kSHUFFLE_LETTERS_UNLOCKED = 1
@@ -144,6 +145,7 @@ func _ready():
144 client.hint_received.connect(_process_hint_received) 145 client.hint_received.connect(_process_hint_received)
145 client.accessible_locations_updated.connect(_on_accessible_locations_updated) 146 client.accessible_locations_updated.connect(_on_accessible_locations_updated)
146 client.checked_locations_updated.connect(_on_checked_locations_updated) 147 client.checked_locations_updated.connect(_on_checked_locations_updated)
148 client.ignored_locations_updated.connect(_on_ignored_locations_updated)
147 client.checked_worldports_updated.connect(_on_checked_worldports_updated) 149 client.checked_worldports_updated.connect(_on_checked_worldports_updated)
148 client.door_latched.connect(_on_door_latched) 150 client.door_latched.connect(_on_door_latched)
149 151
@@ -384,6 +386,14 @@ func _on_checked_worldports_updated():
384 textclient_node.update_worldports() 386 textclient_node.update_worldports()
385 387
386 388
389func _on_ignored_locations_updated(locations):
390 _ignored_locations = locations
391
392 var textclient_node = global.get_node("Textclient")
393 if textclient_node != null:
394 textclient_node.update_locations()
395
396
387func _on_door_latched(door_id): 397func _on_door_latched(door_id):
388 var gamedata = global.get_node("Gamedata") 398 var gamedata = global.get_node("Gamedata")
389 if gamedata.get_door_map_name(door_id) != global.map: 399 if gamedata.get_door_map_name(door_id) != global.map:
@@ -677,3 +687,10 @@ func update_job_well_done_sign():
677 687
678 sign2.get_node("MeshInstance3D").mesh.text = sign2.text 688 sign2.get_node("MeshInstance3D").mesh.text = sign2.text
679 sign3.get_node("MeshInstance3D").mesh.text = sign3.text 689 sign3.get_node("MeshInstance3D").mesh.text = sign3.text
690
691
692func toggle_ignored_location(loc_id):
693 if loc_id in _ignored_locations:
694 client.removeIgnoredLocation(loc_id)
695 else:
696 client.addIgnoredLocation(loc_id)