about summary refs log tree commit diff stats
path: root/Archipelago
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-04-21 11:11:59 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-04-21 11:11:59 -0400
commit0fcd3a848ae1a3be8e4d2aab9b85e27d8136a8a1 (patch)
tree36eed5d82ae46da85927d5efcdbc1829e8ccc9c2 /Archipelago
parent613f7e41b05048f36f23990daa221fc4d3774b11 (diff)
downloadlingo-archipelago-0fcd3a848ae1a3be8e4d2aab9b85e27d8136a8a1.tar.gz
lingo-archipelago-0fcd3a848ae1a3be8e4d2aab9b85e27d8136a8a1.tar.bz2
lingo-archipelago-0fcd3a848ae1a3be8e4d2aab9b85e27d8136a8a1.zip
Client now shows a version number
Diffstat (limited to 'Archipelago')
-rw-r--r--Archipelago/client.gd1
-rw-r--r--Archipelago/load.gd2
-rw-r--r--Archipelago/settings_screen.gd18
3 files changed, 13 insertions, 8 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index f805577..dba8227 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd
@@ -4,6 +4,7 @@ var ap_server = ""
4var ap_user = "" 4var ap_user = ""
5var ap_pass = "" 5var ap_pass = ""
6 6
7const my_version = "0.1.0"
7const ap_version = {"major": 0, "minor": 4, "build": 0, "class": "Version"} 8const ap_version = {"major": 0, "minor": 4, "build": 0, "class": "Version"}
8const orange_tower = ["Second", "Third", "Fourth", "Fifth", "Sixth", "Seventh"] 9const orange_tower = ["Second", "Third", "Fourth", "Fifth", "Sixth", "Seventh"]
9const color_items = [ 10const color_items = [
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 6b65b0e..5403adb 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd
@@ -118,7 +118,7 @@ func _load():
118 # Handle our other static panels after panel randomization, so that the old 118 # Handle our other static panels after panel randomization, so that the old
119 # values can enter the pool, if necessary. 119 # values can enter the pool, if necessary.
120 set_static_panel("Entry Room/Panel_hi_hi", "hi") 120 set_static_panel("Entry Room/Panel_hi_hi", "hi")
121 set_static_panel("Entry Room/Panel_write_write", "seed") 121 set_static_panel("Entry Room/Panel_write_write", apclient.my_version)
122 set_static_panel("Entry Room/Panel_same_same", str(apclient._slot_seed)) 122 set_static_panel("Entry Room/Panel_same_same", str(apclient._slot_seed))
123 set_static_panel("Entry Room/Panel_type_type", "victory") 123 set_static_panel("Entry Room/Panel_type_type", "victory")
124 124
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