about summary refs log tree commit diff stats
path: root/Archipelago
diff options
context:
space:
mode:
Diffstat (limited to 'Archipelago')
-rw-r--r--Archipelago/client.gd12
-rw-r--r--Archipelago/load.gd14
-rw-r--r--Archipelago/settings_screen.gd8
3 files changed, 24 insertions, 10 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 40fa4db..3cb46d3 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd
@@ -1,5 +1,13 @@
1extends Node 1extends Node
2 2
3var SCRIPT_doorControl
4var SCRIPT_effects
5var SCRIPT_location
6var SCRIPT_mypainting
7var SCRIPT_notifier
8var SCRIPT_panel
9var SCRIPT_uuid
10
3var ap_server = "" 11var ap_server = ""
4var ap_user = "" 12var ap_user = ""
5var ap_pass = "" 13var ap_pass = ""
@@ -71,8 +79,6 @@ var _location_name_to_id = {} # LINGO only
71 79
72var _remote_version = {"major": 0, "minor": 0, "build": 0} 80var _remote_version = {"major": 0, "minor": 0, "build": 0}
73 81
74const uuid_util = preload("user://maps/Archipelago/vendor/uuid.gd")
75
76# TODO: caching per MW/slot, reset between connections 82# TODO: caching per MW/slot, reset between connections
77var _authenticated = false 83var _authenticated = false
78var _seed = "" 84var _seed = ""
@@ -518,7 +524,7 @@ func connectToRoom():
518 "password": ap_pass, 524 "password": ap_pass,
519 "game": "Lingo", 525 "game": "Lingo",
520 "name": ap_user, 526 "name": ap_user,
521 "uuid": uuid_util.v4(), 527 "uuid": SCRIPT_uuid.v4(),
522 "version": ap_version, 528 "version": ap_version,
523 "items_handling": 0b111, # always receive our items 529 "items_handling": 0b111, # always receive our items
524 "tags": [], 530 "tags": [],
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index b6d0fba..8360185 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd
@@ -41,7 +41,7 @@ func _load():
41 set_gridmap_tile(-3.5, 6.5, 57.5, "MeshInstance5") 41 set_gridmap_tile(-3.5, 6.5, 57.5, "MeshInstance5")
42 42
43 var door_scene = load("res://nodes/door.tscn") 43 var door_scene = load("res://nodes/door.tscn")
44 var door_script = load("user://maps/Archipelago/doorControl.gd") 44 var door_script = apclient.SCRIPT_doorControl
45 var wanderer_entrance = door_scene.instance() 45 var wanderer_entrance = door_scene.instance()
46 wanderer_entrance.name = "Door_wanderer_entrance" 46 wanderer_entrance.name = "Door_wanderer_entrance"
47 wanderer_entrance.translation = Vector3(7.5, 5, 53) 47 wanderer_entrance.translation = Vector3(7.5, 5, 53)
@@ -113,7 +113,7 @@ func _load():
113 # loaded but the panels haven't been solved from the save file yet. 113 # loaded but the panels haven't been solved from the save file yet.
114 var gamedata = apclient.get_node("Gamedata") 114 var gamedata = apclient.get_node("Gamedata")
115 var panels_parent = self.get_node("Panels") 115 var panels_parent = self.get_node("Panels")
116 var location_script = ResourceLoader.load("user://maps/Archipelago/location.gd") 116 var location_script = apclient.SCRIPT_location
117 for location_id in gamedata.panel_ids_by_location_id.keys(): 117 for location_id in gamedata.panel_ids_by_location_id.keys():
118 if not (gamedata.classification_by_location_id[location_id] & apclient._location_classification_bit): 118 if not (gamedata.classification_by_location_id[location_id] & apclient._location_classification_bit):
119 continue 119 continue
@@ -296,7 +296,7 @@ func _load():
296 296
297 if apclient._early_color_hallways: 297 if apclient._early_color_hallways:
298 var painting_scene = load("res://nodes/paintings/dan_L1_gate.tscn") 298 var painting_scene = load("res://nodes/paintings/dan_L1_gate.tscn")
299 var mypainting_script = ResourceLoader.load("user://maps/Archipelago/mypainting.gd") 299 var mypainting_script = apclient.SCRIPT_mypainting
300 300
301 var exit_painting = painting_scene.instance() 301 var exit_painting = painting_scene.instance()
302 exit_painting.set_name("color_exit_painting") 302 exit_painting.set_name("color_exit_painting")
@@ -413,7 +413,7 @@ func _load():
413 get_node("Doors/Naps Room Doors").add_child(fearless_door) 413 get_node("Doors/Naps Room Doors").add_child(fearless_door)
414 414
415 # Set up notifiers for each achievement panel, for the tracker. 415 # Set up notifiers for each achievement panel, for the tracker.
416 var notifier_script = ResourceLoader.load("user://maps/Archipelago/notifier.gd") 416 var notifier_script = apclient.SCRIPT_notifier
417 for panel in gamedata.panels: 417 for panel in gamedata.panels:
418 if "achievement" in panel: 418 if "achievement" in panel:
419 var panel_node = panels_parent.get_node(panel["id"]) 419 var panel_node = panels_parent.get_node(panel["id"])
@@ -431,7 +431,7 @@ func _load():
431 431
432 # Attach a script to every panel so that we can do things like conditionally 432 # Attach a script to every panel so that we can do things like conditionally
433 # disable them. 433 # disable them.
434 var panel_script = ResourceLoader.load("user://maps/Archipelago/panel.gd") 434 var panel_script = apclient.SCRIPT_panel
435 for panel in gamedata.panels: 435 for panel in gamedata.panels:
436 var panel_node 436 var panel_node
437 if panel["id"].begins_with("EndPanel"): 437 if panel["id"].begins_with("EndPanel"):
@@ -462,7 +462,7 @@ func _load():
462 ) 462 )
463 463
464 # Create the effects node. 464 # Create the effects node.
465 var effects_script = ResourceLoader.load("user://maps/Archipelago/effects.gd") 465 var effects_script = apclient.SCRIPT_effects
466 var effects = effects_script.new() 466 var effects = effects_script.new()
467 effects.set_name("AP_Effects") 467 effects.set_name("AP_Effects")
468 self.add_child(effects) 468 self.add_child(effects)
@@ -515,7 +515,7 @@ func instantiate_painting(name, scene):
515 new_painting.translation = old_painting.translation 515 new_painting.translation = old_painting.translation
516 new_painting.rotation = old_painting.rotation 516 new_painting.rotation = old_painting.rotation
517 517
518 var mypainting_script = ResourceLoader.load("user://maps/Archipelago/mypainting.gd") 518 var mypainting_script = apclient.SCRIPT_mypainting
519 var mps_inst = mypainting_script.new() 519 var mps_inst = mypainting_script.new()
520 mps_inst.set_name("Script") 520 mps_inst.set_name("Script")
521 521
diff --git a/Archipelago/settings_screen.gd b/Archipelago/settings_screen.gd index 3769809..213bc84 100644 --- a/Archipelago/settings_screen.gd +++ b/Archipelago/settings_screen.gd
@@ -17,6 +17,14 @@ func _ready():
17 apclient_instance.name = "Archipelago" 17 apclient_instance.name = "Archipelago"
18 global.add_child(apclient_instance) 18 global.add_child(apclient_instance)
19 19
20 apclient_instance.SCRIPT_doorControl = load("user://maps/Archipelago/doorControl.gd")
21 apclient_instance.SCRIPT_effects = load("user://maps/Archipelago/effects.gd")
22 apclient_instance.SCRIPT_location = load("user://maps/Archipelago/location.gd")
23 apclient_instance.SCRIPT_mypainting = load("user://maps/Archipelago/mypainting.gd")
24 apclient_instance.SCRIPT_notifier = load("user://maps/Archipelago/notifier.gd")
25 apclient_instance.SCRIPT_panel = load("user://maps/Archipelago/panel.gd")
26 apclient_instance.SCRIPT_uuid = load("user://maps/Archipelago/vendor/uuid.gd")
27
20 var apdata = ResourceLoader.load("user://maps/Archipelago/gamedata.gd") 28 var apdata = ResourceLoader.load("user://maps/Archipelago/gamedata.gd")
21 var apdata_instance = apdata.new() 29 var apdata_instance = apdata.new()
22 apdata_instance.name = "Gamedata" 30 apdata_instance.name = "Gamedata"