about summary refs log tree commit diff stats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/Archipelago/client.gd6
-rw-r--r--client/Archipelago/manager.gd10
-rw-r--r--client/Archipelago/player.gd3
-rw-r--r--client/Archipelago/settings_screen.gd38
-rw-r--r--client/CHANGELOG.md21
-rw-r--r--client/archipelago.tscn5
6 files changed, 78 insertions, 5 deletions
diff --git a/client/Archipelago/client.gd b/client/Archipelago/client.gd index 2e080fd..843647d 100644 --- a/client/Archipelago/client.gd +++ b/client/Archipelago/client.gd
@@ -47,6 +47,8 @@ signal location_scout_received(item_id, location_id, player, flags)
47func _init(): 47func _init():
48 set_process_mode(Node.PROCESS_MODE_ALWAYS) 48 set_process_mode(Node.PROCESS_MODE_ALWAYS)
49 49
50 _ws.inbound_buffer_size = 8388608
51
50 global._print("Instantiated APClient") 52 global._print("Instantiated APClient")
51 53
52 # Read AP datapackages from file, if there are any 54 # Read AP datapackages from file, if there are any
@@ -225,7 +227,7 @@ func _process(_delta):
225 error_message = "Unknown error." 227 error_message = "Unknown error."
226 228
227 _initiated_disconnect = true 229 _initiated_disconnect = true
228 _ws.disconnect_from_host() 230 _ws.close()
229 231
230 emit_signal("could_not_connect", error_message) 232 emit_signal("could_not_connect", error_message)
231 global._print("Connection to AP refused") 233 global._print("Connection to AP refused")
@@ -309,7 +311,7 @@ func connectToServer(server, un, pw):
309 % err 311 % err
310 ) 312 )
311 ) 313 )
312 global._print("Could not connect to AP: " + err) 314 global._print("Could not connect to AP: %d" % err)
313 return 315 return
314 _should_process = true 316 _should_process = true
315 317
diff --git a/client/Archipelago/manager.gd b/client/Archipelago/manager.gd index 32882c2..34f5e27 100644 --- a/client/Archipelago/manager.gd +++ b/client/Archipelago/manager.gd
@@ -1,6 +1,6 @@
1extends Node 1extends Node
2 2
3const MOD_VERSION = 1 3const MOD_VERSION = 3
4 4
5var SCRIPT_client 5var SCRIPT_client
6var SCRIPT_keyboard 6var SCRIPT_keyboard
@@ -41,6 +41,7 @@ const kCYAN_DOOR_BEHAVIOR_H2 = 0
41const kCYAN_DOOR_BEHAVIOR_DOUBLE_LETTER = 1 41const kCYAN_DOOR_BEHAVIOR_DOUBLE_LETTER = 1
42const kCYAN_DOOR_BEHAVIOR_ITEM = 2 42const kCYAN_DOOR_BEHAVIOR_ITEM = 2
43 43
44var apworld_version = [0, 0]
44var cyan_door_behavior = kCYAN_DOOR_BEHAVIOR_H2 45var cyan_door_behavior = kCYAN_DOOR_BEHAVIOR_H2
45var daedalus_roof_access = false 46var daedalus_roof_access = false
46var keyholder_sanity = false 47var keyholder_sanity = false
@@ -328,8 +329,8 @@ func _process_location_scout(item_id, location_id, player, flags):
328 collectable.setScoutedText(item_name) 329 collectable.setScoutedText(item_name)
329 330
330 331
331func _client_could_not_connect(): 332func _client_could_not_connect(message):
332 emit_signal("could_not_connect") 333 emit_signal("could_not_connect", message)
333 334
334 335
335func _client_connect_status(message): 336func _client_connect_status(message):
@@ -367,6 +368,9 @@ func _client_connected(slot_data):
367 shuffle_symbols = bool(slot_data.get("shuffle_symbols", false)) 368 shuffle_symbols = bool(slot_data.get("shuffle_symbols", false))
368 victory_condition = int(slot_data.get("victory_condition", 0)) 369 victory_condition = int(slot_data.get("victory_condition", 0))
369 370
371 if slot_data.has("version"):
372 apworld_version = [int(slot_data["version"][0]), int(slot_data["version"][1])]
373
370 # Set up item locks. 374 # Set up item locks.
371 _item_locks = {} 375 _item_locks = {}
372 376
diff --git a/client/Archipelago/player.gd b/client/Archipelago/player.gd index 9de3e07..c8ef320 100644 --- a/client/Archipelago/player.gd +++ b/client/Archipelago/player.gd
@@ -68,6 +68,9 @@ func _ready():
68 68
69 locationListener.senders.append(NodePath("../" + khl.name)) 69 locationListener.senders.append(NodePath("../" + khl.name))
70 70
71 if door.has_complete_at():
72 locationListener.complete_at = door.get_complete_at()
73
71 get_parent().add_child.call_deferred(locationListener) 74 get_parent().add_child.call_deferred(locationListener)
72 75
73 # Set up letter locations. 76 # Set up letter locations.
diff --git a/client/Archipelago/settings_screen.gd b/client/Archipelago/settings_screen.gd index 81e7d3f..2236672 100644 --- a/client/Archipelago/settings_screen.gd +++ b/client/Archipelago/settings_screen.gd
@@ -100,6 +100,10 @@ func _ready():
100 $Panel/player_box.add_theme_font_size_override("font_size", 36) 100 $Panel/player_box.add_theme_font_size_override("font_size", 36)
101 $Panel/password_box.add_theme_font_size_override("font_size", 36) 101 $Panel/password_box.add_theme_font_size_override("font_size", 36)
102 102
103 # Set up version mismatch dialog.
104 $Panel/VersionMismatch.connect("confirmed", startGame)
105 $Panel/VersionMismatch.get_cancel_button().pressed.connect(versionMismatchDeclined)
106
103 107
104# Adapted from https://gitlab.com/Delta-V-Modding/Mods/-/blob/main/game/ModLoader.gd 108# Adapted from https://gitlab.com/Delta-V-Modding/Mods/-/blob/main/game/ModLoader.gd
105func installScriptExtension(childScript: Resource): 109func installScriptExtension(childScript: Resource):
@@ -129,6 +133,33 @@ func connectionStatus(message):
129 133
130func connectionSuccessful(): 134func connectionSuccessful():
131 var ap = global.get_node("Archipelago") 135 var ap = global.get_node("Archipelago")
136 var gamedata = global.get_node("Gamedata")
137
138 # Check for major version mismatch.
139 if ap.apworld_version[0] != gamedata.objects.get_version():
140 $Panel/AcceptDialog.exclusive = false
141
142 var popup = self.get_node("Panel/VersionMismatch")
143 popup.title = "Version Mismatch!"
144 popup.dialog_text = (
145 "This slot was generated using v%d.%d of the Lingo 2 apworld,\nwhich has a different major version than this client (v%d.%d).\nIt is highly recommended to play using the correct version of the client.\nYou may experience bugs or logic issues if you continue."
146 % [
147 ap.apworld_version[0],
148 ap.apworld_version[1],
149 gamedata.objects.get_version(),
150 ap.MOD_VERSION
151 ]
152 )
153 popup.exclusive = true
154 popup.popup_centered()
155
156 return
157
158 startGame()
159
160
161func startGame():
162 var ap = global.get_node("Archipelago")
132 163
133 # Save connection details 164 # Save connection details
134 var connection_details = [ap.ap_server, ap.ap_user, ap.ap_pass] 165 var connection_details = [ap.ap_server, ap.ap_user, ap.ap_pass]
@@ -192,6 +223,13 @@ func connectionUnsuccessful(error_message):
192 popup.get_ok_button().visible = true 223 popup.get_ok_button().visible = true
193 popup.popup_centered() 224 popup.popup_centered()
194 225
226 $Panel/connect_button.disabled = false
227
228
229func versionMismatchDeclined():
230 $Panel/AcceptDialog.hide()
231 $Panel/connect_button.disabled = false
232
195 233
196func historySelected(index): 234func historySelected(index):
197 var ap = global.get_node("Archipelago") 235 var ap = global.get_node("Archipelago")
diff --git a/client/CHANGELOG.md b/client/CHANGELOG.md new file mode 100644 index 0000000..89d9873 --- /dev/null +++ b/client/CHANGELOG.md
@@ -0,0 +1,21 @@
1# lingo2-archipelago Client Releases
2
3## v3.3 - 2025-09-12
4
5- Fixed issue downloading large datapackages (such as TUNIC's).
6- Connection failures now show error messages.
7
8Download:
9[lingo2-archipelago-client-v3.3.zip](https://files.fourisland.com/releases/lingo2-archipelago/client/lingo2-archipelago-client-v3.3.zip)<br/>
10Source:
11[v3.3](https://code.fourisland.com/lingo2-archipelago/tag/?h=client-v3.3)
12
13## v3.2 - 2025-09-12
14
15- Initial release for testing. Features include door shuffle, letter shuffle,
16 and symbol shuffle.
17
18Download:
19[lingo2-archipelago-client-v3.2.zip](https://files.fourisland.com/releases/lingo2-archipelago/client/lingo2-archipelago-client-v3.2.zip)<br/>
20Source:
21[v3.2](https://code.fourisland.com/lingo2-archipelago/tag/?h=client-v3.2)
diff --git a/client/archipelago.tscn b/client/archipelago.tscn index 40dd46f..da83b23 100644 --- a/client/archipelago.tscn +++ b/client/archipelago.tscn
@@ -40,6 +40,7 @@ offset_right = 1920.0
40offset_bottom = 225.0 40offset_bottom = 225.0
41text = "ARCHIPELAGO" 41text = "ARCHIPELAGO"
42valign = 1 42valign = 1
43horizontal_alignment = 1
43theme = ExtResource("2_g4bvn") 44theme = ExtResource("2_g4bvn")
44 45
45[node name="credit" parent="Panel" type="Label"] 46[node name="credit" parent="Panel" type="Label"]
@@ -150,6 +151,10 @@ caret_blink = true
150offset_right = 83.0 151offset_right = 83.0
151offset_bottom = 58.0 152offset_bottom = 58.0
152 153
154[node name="VersionMismatch" type="ConfirmationDialog" parent="Panel"]
155offset_right = 83.0
156offset_bottom = 58.0
157
153[node name="connection_history" type="MenuButton" parent="Panel"] 158[node name="connection_history" type="MenuButton" parent="Panel"]
154offset_left = 1239.0 159offset_left = 1239.0
155offset_top = 276.0 160offset_top = 276.0