From fec0e899d94fde3b79d6bf4059d0e730a4318db9 Mon Sep 17 00:00:00 2001 From: jamesbrq Date: Sat, 18 May 2024 16:26:50 -0400 Subject: [PATCH] MLSS: General bugfixes + Add patch extension to inno_setup.iss (#3286) * Remove outdated header change for ROM verification * Update Connections to be compatible with python ver. 3.8 * Update inno_setup.iss * Update inno_setup.iss --- inno_setup.iss | 5 +++++ worlds/mlss/Client.py | 15 +++------------ worlds/mlss/Regions.py | 7 ++----- worlds/mlss/Rom.py | 3 --- worlds/mlss/data/basepatch.bsdiff | Bin 17619 -> 17615 bytes 5 files changed, 10 insertions(+), 20 deletions(-) diff --git a/inno_setup.iss b/inno_setup.iss index 529a96a33ac6..4b37279e8de0 100644 --- a/inno_setup.iss +++ b/inno_setup.iss @@ -169,6 +169,11 @@ Root: HKCR; Subkey: "{#MyAppName}pkmnepatch"; ValueData: "Ar Root: HKCR; Subkey: "{#MyAppName}pkmnepatch\DefaultIcon"; ValueData: "{app}\ArchipelagoBizHawkClient.exe,0"; ValueType: string; ValueName: ""; Root: HKCR; Subkey: "{#MyAppName}pkmnepatch\shell\open\command"; ValueData: """{app}\ArchipelagoBizHawkClient.exe"" ""%1"""; ValueType: string; ValueName: ""; +Root: HKCR; Subkey: ".apmlss"; ValueData: "{#MyAppName}mlsspatch"; Flags: uninsdeletevalue; ValueType: string; ValueName: ""; +Root: HKCR; Subkey: "{#MyAppName}mlsspatch"; ValueData: "Archipelago Mario & Luigi Superstar Saga Patch"; Flags: uninsdeletekey; ValueType: string; ValueName: ""; +Root: HKCR; Subkey: "{#MyAppName}mlsspatch\DefaultIcon"; ValueData: "{app}\ArchipelagoBizHawkClient.exe,0"; ValueType: string; ValueName: ""; +Root: HKCR; Subkey: "{#MyAppName}mlsspatch\shell\open\command"; ValueData: """{app}\ArchipelagoBizHawkClient.exe"" ""%1"""; ValueType: string; ValueName: ""; + Root: HKCR; Subkey: ".apcv64"; ValueData: "{#MyAppName}cv64patch"; Flags: uninsdeletevalue; ValueType: string; ValueName: ""; Root: HKCR; Subkey: "{#MyAppName}cv64patch"; ValueData: "Archipelago Castlevania 64 Patch"; Flags: uninsdeletekey; ValueType: string; ValueName: ""; Root: HKCR; Subkey: "{#MyAppName}cv64patch\DefaultIcon"; ValueData: "{app}\ArchipelagoBizHawkClient.exe,0"; ValueType: string; ValueName: ""; diff --git a/worlds/mlss/Client.py b/worlds/mlss/Client.py index 322f243ceb00..a1cd43afbae8 100644 --- a/worlds/mlss/Client.py +++ b/worlds/mlss/Client.py @@ -47,19 +47,10 @@ async def validate_rom(self, ctx: "BizHawkClientContext") -> bool: # Check ROM name/patch version rom_name_bytes = await bizhawk.read(ctx.bizhawk_ctx, [(0xA0, 14, "ROM")]) rom_name = bytes([byte for byte in rom_name_bytes[0] if byte != 0]).decode("UTF-8") - if not rom_name.startswith("MARIO&LUIGIU"): - return False - if rom_name == "MARIO&LUIGIUA8": - logger.info( - "ERROR: You appear to be running an unpatched version of Mario & Luigi Superstar Saga. " - "You need to generate a patch file and use it to create a patched ROM." - ) - return False - if rom_name != "MARIO&LUIGIUAP": + if not rom_name.startswith("MARIO&LUIGIUA8"): logger.info( - "ERROR: The patch file used to create this ROM is not compatible with " - "this client. Double check your client version against the version being " - "used by the generator." + "ERROR: You have opened a game that is not Mario & Luigi Superstar Saga. " + "Please make sure you are opening the correct ROM." ) return False except UnicodeDecodeError: diff --git a/worlds/mlss/Regions.py b/worlds/mlss/Regions.py index be1c5d1063ae..992e99e2c7f7 100644 --- a/worlds/mlss/Regions.py +++ b/worlds/mlss/Regions.py @@ -299,7 +299,7 @@ def connect( target: str, rule: typing.Optional[typing.Callable] = None, reach: typing.Optional[bool] = False, -) -> Entrance | None: +) -> typing.Optional[Entrance]: source_region = world.multiworld.get_region(source, world.player) target_region = world.multiworld.get_region(target, world.player) @@ -317,7 +317,4 @@ def connect( source_region.exits.append(connection) connection.connect(target_region) - if reach: - return connection - else: - return None + return connection if reach else None diff --git a/worlds/mlss/Rom.py b/worlds/mlss/Rom.py index 1b8a182509ae..08921500dacb 100644 --- a/worlds/mlss/Rom.py +++ b/worlds/mlss/Rom.py @@ -272,9 +272,6 @@ def write_tokens(world: "MLSSWorld", patch: MLSSProcedurePatch) -> None: # Bake seed name into ROM patch.write_token(APTokenTypes.WRITE, 0xDF00A0, world.multiworld.seed_name.encode("UTF-8")) - # Bake patch into header - patch.write_token(APTokenTypes.WRITE, 0xAD, "P".encode("UTF-8")) - # Intro Skip patch.write_token( APTokenTypes.WRITE, diff --git a/worlds/mlss/data/basepatch.bsdiff b/worlds/mlss/data/basepatch.bsdiff index 45ed6a6b724fda04f43c17471aa42db1f2eabab3..156d28f346e8fa38fb2d1c4a3ce1b9e01342e848 100644 GIT binary patch delta 5219 zcmV-p6rAhRi2=`v0TDt|L`gKq*M>?jD02Rqm(_HZbV&d_)pt(?E?iG}>v3ZBG=Q2{)xYrpVOVo{g!d(w@>L z@_@wjro}NlhEpcfA(Y9G^qV6iQL;}ar=-(jCYvUa>7>c&r1Xp?PgB(L06i({G}BEm znlgDosiG4`h{=hmwx*bq$&#O@e^P#k(@#QS8$m~=Mngu4vSkfCplP(3sewHs)YBu< zX{MTJ!7^fLp`+B$Xf$XVG!3X|0iz%Q(;ylHQ$TA6F zQhJ$)Jx!{5nlKUSdY;tCWScNSkG|}p4!$BTRAi)9Z44N`DXw%ea$)Ta3G}A*( z44DC-02*WiKmgDIp`%Rz(?XMR4H=Vw4F`V&N|FhwMJ4QkvLbTvGF9Fi+YiShwcCI3 zad>fCW_6Gu5fF@^*;%V_vXP4k;mA0ctvB*}++Rn+CiUV_q|FF1f8;dJ|xWTa;OZHv7hW=H|y zRd$JTu=b2BPzE^XGW4|GGa0oaNjiU2?1ow89BK#bMM)V}&Vnk7O3T(Uxw?|_(Q~q)*{-(Qmz8EumKPDBT51l z^8*AOwhr?Y4Kxuj5e2e<8JK?}w`i%SL;)m3OuSHUFaRtfWgw_uKME92Vj?Mmh!oHl zMG#7;s-^ZKjv4}iVF3Vd@ljIe02MFs6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