diff options
Diffstat (limited to 'apworld/client/manager.gd')
| -rw-r--r-- | apworld/client/manager.gd | 17 | 
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 = {} | |||
| 29 | var _held_letters = {} | 29 | var _held_letters = {} | 
| 30 | var _letters_setup = false | 30 | var _letters_setup = false | 
| 31 | var _already_connected = false | 31 | var _already_connected = false | 
| 32 | var _ignored_locations = [] | ||
| 32 | 33 | ||
| 33 | const kSHUFFLE_LETTERS_VANILLA = 0 | 34 | const kSHUFFLE_LETTERS_VANILLA = 0 | 
| 34 | const kSHUFFLE_LETTERS_UNLOCKED = 1 | 35 | const 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 | ||
| 389 | func _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 | |||
| 387 | func _on_door_latched(door_id): | 397 | func _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 | |||
| 692 | func toggle_ignored_location(loc_id): | ||
| 693 | if loc_id in _ignored_locations: | ||
| 694 | client.removeIgnoredLocation(loc_id) | ||
| 695 | else: | ||
| 696 | client.addIgnoredLocation(loc_id) | ||
