From e8e084bb5117d1cf61cd54772e4eb9042a436cb7 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 29 Sep 2025 16:05:35 -0400 Subject: Client uses new versioning scheme now --- apworld/client/main.gd | 13 ++++++++----- apworld/client/manager.gd | 9 +++++---- 2 files changed, 13 insertions(+), 9 deletions(-) (limited to 'apworld') 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(): history_box.get_popup().id_pressed.connect(historySelected) # Show client version. + var version = gamedata.objects.get_version() get_node("../Panel/title").text = ( - "ARCHIPELAGO (%d.%d)" % [gamedata.objects.get_version(), ap.MOD_VERSION] + "ARCHIPELAGO (%d.%d.%d)" % [version.get_major(), version.get_minor(), version.get_patch()] ) # Increase font size in text boxes. @@ -173,18 +174,20 @@ func connectionSuccessful(): var gamedata = global.get_node("Gamedata") # Check for major version mismatch. - if ap.apworld_version[0] != gamedata.objects.get_version(): + if ap.apworld_version[0] != gamedata.objects.get_version().get_major(): get_node("../Panel/AcceptDialog").exclusive = false var popup = get_node("../Panel/VersionMismatch") popup.title = "Version Mismatch!" popup.dialog_text = ( - "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." + "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." % [ ap.apworld_version[0], ap.apworld_version[1], - gamedata.objects.get_version(), - ap.MOD_VERSION + ap.apworld_version[2], + gamedata.objects.get_version().get_major(), + gamedata.objects.get_version().get_minor(), + gamedata.objects.get_version().get_patch() ] ) 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 @@ extends Node -const MOD_VERSION = 7 - var SCRIPT_client var SCRIPT_keyboard var SCRIPT_locationListener @@ -61,7 +59,7 @@ const kEndingNameByVictoryValue = { 12: "WHITE", } -var apworld_version = [0, 0] +var apworld_version = [0, 0, 0] var cyan_door_behavior = kCYAN_DOOR_BEHAVIOR_H2 var daedalus_roof_access = false var keyholder_sanity = false @@ -395,7 +393,10 @@ func _client_connected(slot_data): victory_condition = int(slot_data.get("victory_condition", 0)) if slot_data.has("version"): - apworld_version = [int(slot_data["version"][0]), int(slot_data["version"][1])] + var version_msg = slot_data["version"] + apworld_version = [int(version_msg[0]), int(version_msg[1]), 0] + if version_msg.size() > 2: + apworld_version[2] = int(version_msg[2]) port_pairings.clear() if slot_data.has("port_pairings"): -- cgit 1.4.1