diff options
Diffstat (limited to 'Archipelago')
-rw-r--r-- | Archipelago/settings_screen.gd | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/Archipelago/settings_screen.gd b/Archipelago/settings_screen.gd index 213bc84..a3305e5 100644 --- a/Archipelago/settings_screen.gd +++ b/Archipelago/settings_screen.gd | |||
@@ -31,16 +31,16 @@ func _ready(): | |||
31 | apclient_instance.add_child(apdata_instance) | 31 | apclient_instance.add_child(apdata_instance) |
32 | 32 | ||
33 | # Let's also inject any scripts we need to inject now. | 33 | # Let's also inject any scripts we need to inject now. |
34 | installScriptExtension("user://maps/Archipelago/doorControl.gd") | 34 | installScriptExtension(apclient_instance.SCRIPT_doorControl) |
35 | installScriptExtension("user://maps/Archipelago/load.gd") | 35 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/load.gd")) |
36 | installScriptExtension("user://maps/Archipelago/painting_eye.gd") | 36 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/painting_eye.gd")) |
37 | installScriptExtension("user://maps/Archipelago/painting_scenery.gd") | 37 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/painting_scenery.gd")) |
38 | installScriptExtension("user://maps/Archipelago/panelLevelSwitch.gd") | 38 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/panelLevelSwitch.gd")) |
39 | installScriptExtension("user://maps/Archipelago/panelEnd.gd") | 39 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/panelEnd.gd")) |
40 | installScriptExtension("user://maps/Archipelago/panelInput.gd") | 40 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/panelInput.gd")) |
41 | installScriptExtension("user://maps/Archipelago/pause_menu.gd") | 41 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/pause_menu.gd")) |
42 | installScriptExtension("user://maps/Archipelago/player.gd") | 42 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/player.gd")) |
43 | installScriptExtension("user://maps/Archipelago/worldTransporter.gd") | 43 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/worldTransporter.gd")) |
44 | 44 | ||
45 | var apclient = global.get_node("Archipelago") | 45 | var apclient = global.get_node("Archipelago") |
46 | apclient.connect("client_connected", self, "connectionSuccessful") | 46 | apclient.connect("client_connected", self, "connectionSuccessful") |
@@ -67,9 +67,7 @@ func _ready(): | |||
67 | 67 | ||
68 | 68 | ||
69 | # Adapted from https://gitlab.com/Delta-V-Modding/Mods/-/blob/main/game/ModLoader.gd | 69 | # Adapted from https://gitlab.com/Delta-V-Modding/Mods/-/blob/main/game/ModLoader.gd |
70 | func installScriptExtension(childScriptPath: String): | 70 | func installScriptExtension(childScript: Resource): |
71 | var childScript = ResourceLoader.load(childScriptPath) | ||
72 | |||
73 | # Force Godot to compile the script now. | 71 | # Force Godot to compile the script now. |
74 | # We need to do this here to ensure that the inheritance chain is | 72 | # We need to do this here to ensure that the inheritance chain is |
75 | # properly set up, and multiple mods can chain-extend the same | 73 | # properly set up, and multiple mods can chain-extend the same |
@@ -82,7 +80,7 @@ func installScriptExtension(childScriptPath: String): | |||
82 | var parentScript = childScript.get_base_script() | 80 | var parentScript = childScript.get_base_script() |
83 | var parentScriptPath = parentScript.resource_path | 81 | var parentScriptPath = parentScript.resource_path |
84 | global._print( | 82 | global._print( |
85 | "ModLoader: Installing script extension: %s <- %s" % [parentScriptPath, childScriptPath] | 83 | "ModLoader: Installing script extension over %s" % parentScriptPath |
86 | ) | 84 | ) |
87 | childScript.take_over_path(parentScriptPath) | 85 | childScript.take_over_path(parentScriptPath) |
88 | 86 | ||