fix BaseName undefined error

master
magical 2024-02-04 10:17:11 -08:00
parent 4622f61057
commit 1f2cba725d
1 changed files with 2 additions and 2 deletions

View File

@ -2579,7 +2579,7 @@ def randomize_game(graph):
patch_game() patch_game()
def patch_game(): def patch_game():
global FileName, BaseName global FileName, BaseGame
CreditsOffsets = { CreditsOffsets = {
'ChargeBeam': 7655617, 'ChargeBeam': 7655617,
'WideBeam': 7655725, 'WideBeam': 7655725,
@ -2616,7 +2616,7 @@ def patch_game():
os.system('.\\armips\\armips.exe "Metroid Fusion Open Randomizer.asm" -root ".\\data\\asm" -sym ".\\temp.sym"') os.system('.\\armips\\armips.exe "Metroid Fusion Open Randomizer.asm" -root ".\\data\\asm" -sym ".\\temp.sym"')
os.replace('.\\data\\MFOR.gba', '.\\seeds\\{}.gba'.format(FileName)) os.replace('.\\data\\MFOR.gba', '.\\seeds\\{}.gba'.format(FileName))
else: else:
source = open(BaseName, 'rb') source = open(BaseGame, 'rb')
target = open(os.path.join('.', 'seeds', '{}.gba'.format(FileName)), 'wb') target = open(os.path.join('.', 'seeds', '{}.gba'.format(FileName)), 'wb')
patch = open(os.path.join('.', 'data', 'MFOR.bps'), 'rb') patch = open(os.path.join('.', 'data', 'MFOR.bps'), 'rb')
try: try: