Merge branch 'DoorDevUnstable' of https://github.com/ardnaxelarak/ALttPDoorRandomizer into ardnaxelarak-DoorDevUnstable

This commit is contained in:
aerinon
2021-07-23 10:04:02 -07:00
16 changed files with 23 additions and 21 deletions

5
Rom.py
View File

@@ -5,7 +5,7 @@ import json
import hashlib
import logging
import os
import random
import RaceRandom as random
import struct
import sys
import subprocess
@@ -1529,8 +1529,9 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False):
# set rom name
# 21 bytes
from Main import __version__
seedstring = f'{world.seed:09}' if isinstance(world.seed, int) else world.seed
# todo: change to DR when Enemizer is okay with DR
rom.name = bytearray(f'ER{__version__.split("-")[0].replace(".","")[0:3]}_{team+1}_{player}_{world.seed:09}\0', 'utf8')[:21]
rom.name = bytearray(f'ER{__version__.split("-")[0].replace(".","")[0:3]}_{team+1}_{player}_{seedstring}\0', 'utf8')[:21]
rom.name.extend([0] * (21 - len(rom.name)))
rom.write_bytes(0x7FC0, rom.name)