mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-04-08 11:38:13 -07:00
LADX: Give better feedback during patching (#5401)
This commit is contained in:
@@ -47,6 +47,10 @@ class BadRetroArchResponse(GameboyException):
|
||||
|
||||
class BadRetroArchResponse(GameboyException):
|
||||
pass
|
||||
|
||||
|
||||
class VersionError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class LAClientConstants:
|
||||
@@ -518,7 +522,7 @@ class LinksAwakeningContext(CommonContext):
|
||||
class LADXManager(GameManager):
|
||||
logging_pairs = [
|
||||
("Client", "Archipelago"),
|
||||
("Tracker", "Tracker"),
|
||||
("Tracker", "Tracker"),
|
||||
]
|
||||
base_title = f"Links Awakening DX Client {LinksAwakeningWorld.world_version.as_simple_string()} | Archipelago"
|
||||
|
||||
@@ -614,11 +618,20 @@ class LinksAwakeningContext(CommonContext):
|
||||
|
||||
def on_package(self, cmd: str, args: dict):
|
||||
if cmd == "Connected":
|
||||
self.game = self.slot_info[self.slot].game
|
||||
self.slot_data = args.get("slot_data", {})
|
||||
generated_version = Utils.tuplize_version(self.slot_data.get("world_version", "2.0.0"))
|
||||
client_version = LinksAwakeningWorld.world_version
|
||||
if generated_version.major != client_version.major:
|
||||
self.disconnected_intentionally = True
|
||||
raise VersionError(
|
||||
f"The installed world ({client_version.as_simple_string()}) is incompatible with "
|
||||
f"the world this game was generated on ({generated_version.as_simple_string()})"
|
||||
)
|
||||
# This is sent to magpie over local websocket to make its own connection
|
||||
self.slot_data.update({
|
||||
"server_address": self.server_address,
|
||||
"slot_name": self.player_names[self.slot],
|
||||
"password": self.password,
|
||||
"client_version": client_version.as_simple_string(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user