Change order of parts in rom name for compatibility with webmulti

This commit is contained in:
2026-01-25 10:11:10 -06:00
parent 640a5bc3a7
commit 9e5db19c73

4
Rom.py
View File

@@ -1898,14 +1898,14 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
raise Exception('ROM header too long. Max 21 bytes, found %d bytes.' % len(rom_header))
if world.players > 1 and world.teams > 1 and len(rom_header) <= 12:
rom.name = bytearray(f"GK_{rom_header}_{team + 1}_{player}", 'utf8')
rom.name = bytearray(f"GK_{team + 1}_{player}_{rom_header}", 'utf8')
elif len(rom_header) <= 18:
rom.name = bytearray(f"GK_{rom_header}", 'utf8')
else:
rom.name = bytearray(rom_header, 'utf8')
else:
if world.players > 1 and world.teams > 1:
rom.name = bytearray(f'GK_{world.seed}_{team + 1}_{player}', 'utf8')
rom.name = bytearray(f'GK_{team + 1}_{player}_{world.seed}', 'utf8')
else:
rom.name = bytearray(f'GK_{world.seed}', 'utf8')