diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-04-21 11:11:59 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-04-21 11:11:59 -0400 |
commit | 0fcd3a848ae1a3be8e4d2aab9b85e27d8136a8a1 (patch) | |
tree | 36eed5d82ae46da85927d5efcdbc1829e8ccc9c2 /Archipelago/settings_screen.gd | |
parent | 613f7e41b05048f36f23990daa221fc4d3774b11 (diff) | |
download | lingo-archipelago-0fcd3a848ae1a3be8e4d2aab9b85e27d8136a8a1.tar.gz lingo-archipelago-0fcd3a848ae1a3be8e4d2aab9b85e27d8136a8a1.tar.bz2 lingo-archipelago-0fcd3a848ae1a3be8e4d2aab9b85e27d8136a8a1.zip |
Client now shows a version number
Diffstat (limited to 'Archipelago/settings_screen.gd')
-rw-r--r-- | Archipelago/settings_screen.gd | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Archipelago/settings_screen.gd b/Archipelago/settings_screen.gd index 6216dd7..7da2f43 100644 --- a/Archipelago/settings_screen.gd +++ b/Archipelago/settings_screen.gd | |||
@@ -8,8 +8,8 @@ func _ready(): | |||
8 | 8 | ||
9 | # Create the global AP client, if it doesn't already exist. | 9 | # Create the global AP client, if it doesn't already exist. |
10 | if not global.has_node("Archipelago"): | 10 | if not global.has_node("Archipelago"): |
11 | var apclient = ResourceLoader.load("user://maps/Archipelago/client.gd") | 11 | var apclient_script = ResourceLoader.load("user://maps/Archipelago/client.gd") |
12 | var apclient_instance = apclient.new() | 12 | var apclient_instance = apclient_script.new() |
13 | apclient_instance.name = "Archipelago" | 13 | apclient_instance.name = "Archipelago" |
14 | global.add_child(apclient_instance) | 14 | global.add_child(apclient_instance) |
15 | 15 | ||
@@ -26,13 +26,17 @@ func _ready(): | |||
26 | installScriptExtension("user://maps/Archipelago/panelEnd.gd") | 26 | installScriptExtension("user://maps/Archipelago/panelEnd.gd") |
27 | installScriptExtension("user://maps/Archipelago/pause_menu.gd") | 27 | installScriptExtension("user://maps/Archipelago/pause_menu.gd") |
28 | 28 | ||
29 | global.get_node("Archipelago").connect("client_connected", self, "connectionSuccessful") | 29 | var apclient = global.get_node("Archipelago") |
30 | global.get_node("Archipelago").connect("could_not_connect", self, "connectionUnsuccessful") | 30 | apclient.connect("client_connected", self, "connectionSuccessful") |
31 | apclient.connect("could_not_connect", self, "connectionUnsuccessful") | ||
31 | 32 | ||
32 | # Populate textboxes with AP settings. | 33 | # Populate textboxes with AP settings. |
33 | self.get_node("Panel/server_box").text = global.get_node("Archipelago").ap_server | 34 | self.get_node("Panel/server_box").text = apclient.ap_server |
34 | self.get_node("Panel/player_box").text = global.get_node("Archipelago").ap_user | 35 | self.get_node("Panel/player_box").text = apclient.ap_user |
35 | self.get_node("Panel/password_box").text = global.get_node("Archipelago").ap_pass | 36 | self.get_node("Panel/password_box").text = apclient.ap_pass |
37 | |||
38 | # Show client version. | ||
39 | self.get_node("Panel/title").text = "ARCHIPELAGO (%s)" % apclient.my_version | ||
36 | 40 | ||
37 | 41 | ||
38 | # Adapted from https://gitlab.com/Delta-V-Modding/Mods/-/blob/main/game/ModLoader.gd | 42 | # Adapted from https://gitlab.com/Delta-V-Modding/Mods/-/blob/main/game/ModLoader.gd |