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
This commit is contained in:
		
							parent
							
								
									2bc345504e
								
							
						
					
					
						commit
						0e893889c7
					
				| 
						 | 
				
			
			@ -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: "";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,19 +47,10 @@ class MLSSClient(BizHawkClient):
 | 
			
		|||
            # 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":
 | 
			
		||||
            if not rom_name.startswith("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":
 | 
			
		||||
                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:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							
		Loading…
	
		Reference in New Issue