More romname fixes

This commit is contained in:
2026-01-25 10:34:37 -06:00
parent 9e5db19c73
commit a51be12a4a

4
Rom.py
View File

@@ -1897,14 +1897,14 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
if len(rom_header) > 21:
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:
if world.players > 1 and len(rom_header) <= 12:
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:
if world.players > 1:
rom.name = bytearray(f'GK_{team + 1}_{player}_{world.seed}', 'utf8')
else:
rom.name = bytearray(f'GK_{world.seed}', 'utf8')