mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Style fixes
A bunch of style fixes. Mostly white space and style import order tweaks, but a few other stylistic changes are present too.
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
from collections import OrderedDict
|
||||
from Utils import output_path
|
||||
import os
|
||||
import time
|
||||
import logging
|
||||
|
||||
from Rom import LocalRom, apply_rom_settings
|
||||
from Utils import output_path
|
||||
from Rom import LocalRom, Sprite, apply_rom_settings
|
||||
|
||||
|
||||
def adjust(args):
|
||||
@@ -13,7 +12,7 @@ def adjust(args):
|
||||
logger.info('Patching ROM.')
|
||||
|
||||
if args.sprite is not None:
|
||||
if isinstance(args.sprite,Sprite):
|
||||
if isinstance(args.sprite, Sprite):
|
||||
sprite = args.sprite
|
||||
else:
|
||||
sprite = Sprite(args.sprite)
|
||||
@@ -22,7 +21,7 @@ def adjust(args):
|
||||
|
||||
outfilebase = 'ER_adjusted'
|
||||
|
||||
if (os.stat(args.rom).st_size == 2097152 and os.path.splitext(args.rom)[-1].lower() == '.sfc'):
|
||||
if os.stat(args.rom).st_size == 2097152 and os.path.splitext(args.rom)[-1].lower() == '.sfc':
|
||||
rom = LocalRom(args.rom, False)
|
||||
else:
|
||||
raise RuntimeError('Provided Rom is not a valid Link to the Past Randomizer Rom. Please provide one for adjusting.')
|
||||
@@ -32,6 +31,6 @@ def adjust(args):
|
||||
rom.write_to_file(output_path('%s.sfc' % outfilebase))
|
||||
|
||||
logger.info('Done. Enjoy.')
|
||||
logger.debug('Total Time: %s' % (time.clock() - start))
|
||||
logger.debug('Total Time: %s', time.clock() - start)
|
||||
|
||||
return args
|
||||
|
Reference in New Issue
Block a user