about summary refs log tree commit diff stats
path: root/apworld
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-09-29 16:05:35 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2025-09-29 16:05:35 -0400
commite8e084bb5117d1cf61cd54772e4eb9042a436cb7 (patch)
tree0be5b0f17ad4655ac801f0cb340912b5065c9d54 /apworld
parent9bd56a242666a040bd09b2ebbf6faa4ff473775e (diff)
downloadlingo2-archipelago-e8e084bb5117d1cf61cd54772e4eb9042a436cb7.tar.gz
lingo2-archipelago-e8e084bb5117d1cf61cd54772e4eb9042a436cb7.tar.bz2
lingo2-archipelago-e8e084bb5117d1cf61cd54772e4eb9042a436cb7.zip
Client uses new versioning scheme now
Diffstat (limited to 'apworld')
-rw-r--r--apworld/client/main.gd13
-rw-r--r--apworld/client/manager.gd9
2 files changed, 13 insertions, 9 deletions
diff --git a/apworld/client/main.gd b/apworld/client/main.gd index 8425d8c..2d2e606 100644 --- a/apworld/client/main.gd +++ b/apworld/client/main.gd
@@ -102,8 +102,9 @@ func _ready():
102 history_box.get_popup().id_pressed.connect(historySelected) 102 history_box.get_popup().id_pressed.connect(historySelected)
103 103
104 # Show client version. 104 # Show client version.
105 var version = gamedata.objects.get_version()
105 get_node("../Panel/title").text = ( 106 get_node("../Panel/title").text = (
106 "ARCHIPELAGO (%d.%d)" % [gamedata.objects.get_version(), ap.MOD_VERSION] 107 "ARCHIPELAGO (%d.%d.%d)" % [version.get_major(), version.get_minor(), version.get_patch()]
107 ) 108 )
108 109
109 # Increase font size in text boxes. 110 # Increase font size in text boxes.
@@ -173,18 +174,20 @@ func connectionSuccessful():
173 var gamedata = global.get_node("Gamedata") 174 var gamedata = global.get_node("Gamedata")
174 175
175 # Check for major version mismatch. 176 # Check for major version mismatch.
176 if ap.apworld_version[0] != gamedata.objects.get_version(): 177 if ap.apworld_version[0] != gamedata.objects.get_version().get_major():
177 get_node("../Panel/AcceptDialog").exclusive = false 178 get_node("../Panel/AcceptDialog").exclusive = false
178 179
179 var popup = get_node("../Panel/VersionMismatch") 180 var popup = get_node("../Panel/VersionMismatch")
180 popup.title = "Version Mismatch!" 181 popup.title = "Version Mismatch!"
181 popup.dialog_text = ( 182 popup.dialog_text = (
182 "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." 183 "This slot was generated using v%d.%d.%d of the Lingo 2 apworld,\nwhich has a different major version than this client (v%d.%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."
183 % [ 184 % [
184 ap.apworld_version[0], 185 ap.apworld_version[0],
185 ap.apworld_version[1], 186 ap.apworld_version[1],
186 gamedata.objects.get_version(), 187 ap.apworld_version[2],
187 ap.MOD_VERSION 188 gamedata.objects.get_version().get_major(),
189 gamedata.objects.get_version().get_minor(),
190 gamedata.objects.get_version().get_patch()
188 ] 191 ]
189 ) 192 )
190 popup.exclusive = true 193 popup.exclusive = true
diff --git a/apworld/client/manager.gd b/apworld/client/manager.gd index b4fef1c..a5b9db0 100644 --- a/apworld/client/manager.gd +++ b/apworld/client/manager.gd
@@ -1,7 +1,5 @@
1extends Node 1extends Node
2 2
3const MOD_VERSION = 7
4
5var SCRIPT_client 3var SCRIPT_client
6var SCRIPT_keyboard 4var SCRIPT_keyboard
7var SCRIPT_locationListener 5var SCRIPT_locationListener
@@ -61,7 +59,7 @@ const kEndingNameByVictoryValue = {
61 12: "WHITE", 59 12: "WHITE",
62} 60}
63 61
64var apworld_version = [0, 0] 62var apworld_version = [0, 0, 0]
65var cyan_door_behavior = kCYAN_DOOR_BEHAVIOR_H2 63var cyan_door_behavior = kCYAN_DOOR_BEHAVIOR_H2
66var daedalus_roof_access = false 64var daedalus_roof_access = false
67var keyholder_sanity = false 65var keyholder_sanity = false
@@ -395,7 +393,10 @@ func _client_connected(slot_data):
395 victory_condition = int(slot_data.get("victory_condition", 0)) 393 victory_condition = int(slot_data.get("victory_condition", 0))
396 394
397 if slot_data.has("version"): 395 if slot_data.has("version"):
398 apworld_version = [int(slot_data["version"][0]), int(slot_data["version"][1])] 396 var version_msg = slot_data["version"]
397 apworld_version = [int(version_msg[0]), int(version_msg[1]), 0]
398 if version_msg.size() > 2:
399 apworld_version[2] = int(version_msg[2])
399 400
400 port_pairings.clear() 401 port_pairings.clear()
401 if slot_data.has("port_pairings"): 402 if slot_data.has("port_pairings"):