Merged in DR v1.4.1.11
This commit is contained in:
21
Main.py
21
Main.py
@@ -41,7 +41,7 @@ from source.enemizer.DamageTables import DamageTable
|
||||
from source.enemizer.Enemizer import randomize_enemies
|
||||
from source.rom.DataTables import init_data_tables
|
||||
|
||||
version_number = '1.4.1.10'
|
||||
version_number = '1.4.1.11'
|
||||
version_branch = '-u'
|
||||
__version__ = f'{version_number}{version_branch}'
|
||||
|
||||
@@ -87,7 +87,6 @@ def main(args, seed=None, fish=None):
|
||||
for i in zip(args.logic.values(), args.door_shuffle.values()):
|
||||
if i[0] == 'hybridglitches' and i[1] != 'vanilla':
|
||||
raise RuntimeError(BabelFish().translate("cli","cli","hybridglitches.door.shuffle"))
|
||||
|
||||
if seed is None:
|
||||
random.seed(None)
|
||||
world.seed = random.randint(0, 999999999)
|
||||
@@ -160,7 +159,7 @@ def main(args, seed=None, fish=None):
|
||||
world.settings = CustomSettings()
|
||||
world.settings.create_from_world(world, args)
|
||||
|
||||
if args.create_spoiler and not args.jsonout:
|
||||
if world.spoiler_mode != 'none' and not args.jsonout:
|
||||
logger.info(world.fish.translate("cli", "cli", "create.meta"))
|
||||
world.spoiler.meta_to_file(output_path(f'{outfilebase}_Spoiler.txt'))
|
||||
if args.mystery and not (args.suppress_meta or args.create_spoiler):
|
||||
@@ -365,12 +364,12 @@ def main(args, seed=None, fish=None):
|
||||
|
||||
if args.mystery and not (args.suppress_meta or args.create_spoiler):
|
||||
world.spoiler.hashes_to_file(output_path(f'{outfilebase}_meta.txt'))
|
||||
elif args.create_spoiler and not args.jsonout:
|
||||
elif world.spoiler_mode != 'none' and not args.jsonout:
|
||||
world.spoiler.hashes_to_file(output_path(f'{outfilebase}_Spoiler.txt'))
|
||||
if args.create_spoiler and not args.jsonout:
|
||||
if world.spoiler_mode != 'none' and not args.jsonout:
|
||||
logger.info(world.fish.translate("cli", "cli", "patching.spoiler"))
|
||||
world.spoiler.to_file(output_path(f'{outfilebase}_Spoiler.txt'))
|
||||
if args.loglevel == 'debug':
|
||||
if 'debug' in world.spoiler.settings:
|
||||
world.spoiler.extras(output_path(f'{outfilebase}_Spoiler.txt'))
|
||||
|
||||
if not args.skip_playthrough:
|
||||
@@ -379,7 +378,7 @@ def main(args, seed=None, fish=None):
|
||||
|
||||
if args.jsonout:
|
||||
print(json.dumps({**jsonout, 'spoiler': world.spoiler.to_json()}))
|
||||
elif args.create_spoiler:
|
||||
elif world.spoiler_mode != 'none':
|
||||
logger.info(world.fish.translate("cli","cli","patching.spoiler"))
|
||||
if args.jsonout:
|
||||
with open(output_path('%s_Spoiler.json' % outfilebase), 'w') as outfile:
|
||||
@@ -394,7 +393,7 @@ def main(args, seed=None, fish=None):
|
||||
logger.info("")
|
||||
logger.info(world.fish.translate("cli","cli","made.rom") % (YES if (args.create_rom) else NO))
|
||||
logger.info(world.fish.translate("cli","cli","made.playthrough") % (YES if (args.calc_playthrough) else NO))
|
||||
logger.info(world.fish.translate("cli","cli","made.spoiler") % (YES if (not args.jsonout and args.create_spoiler) else NO))
|
||||
logger.info(world.fish.translate("cli","cli","made.spoiler") % (YES if (not args.jsonout and world.spoiler_mode != 'none') else NO))
|
||||
logger.info(world.fish.translate("cli","cli","seed") + ": %s", world.seed)
|
||||
logger.info(world.fish.translate("cli","cli","total.time"), time.perf_counter() - start)
|
||||
|
||||
@@ -452,7 +451,7 @@ def init_world(args, fish):
|
||||
|
||||
world = World(args.multi, args.ow_shuffle, args.ow_crossed, args.ow_mixed, args.shuffle, args.door_shuffle, args.logic, args.mode, args.swords,
|
||||
args.difficulty, args.item_functionality, args.timer, args.progressive, args.goal, args.algorithm,
|
||||
args.accessibility, args.shuffleganon, args.custom, args.customitemarray, args.hints)
|
||||
args.accessibility, args.shuffleganon, args.custom, args.customitemarray, args.hints, args.spoiler)
|
||||
|
||||
world.customizer = customized
|
||||
world.boots_hint = args.boots_hint.copy()
|
||||
@@ -530,7 +529,7 @@ def copy_world(world):
|
||||
# ToDo: Not good yet
|
||||
ret = World(world.players, world.owShuffle, world.owCrossed, world.owMixed, world.shuffle, world.doorShuffle, world.logic, world.mode, world.swords,
|
||||
world.difficulty, world.difficulty_adjustments, world.timer, world.progressive, world.goal, world.algorithm,
|
||||
world.accessibility, world.shuffle_ganon, world.custom, world.customitemarray, world.hints)
|
||||
world.accessibility, world.shuffle_ganon, world.custom, world.customitemarray, world.hints, world.spoiler_mode)
|
||||
ret.teams = world.teams
|
||||
ret.player_names = copy.deepcopy(world.player_names)
|
||||
ret.remote_items = world.remote_items.copy()
|
||||
@@ -725,7 +724,7 @@ def copy_world_premature(world, player):
|
||||
# ToDo: Not good yet
|
||||
ret = World(world.players, world.owShuffle, world.owCrossed, world.owMixed, world.shuffle, world.doorShuffle, world.logic, world.mode, world.swords,
|
||||
world.difficulty, world.difficulty_adjustments, world.timer, world.progressive, world.goal, world.algorithm,
|
||||
world.accessibility, world.shuffle_ganon, world.custom, world.customitemarray, world.hints)
|
||||
world.accessibility, world.shuffle_ganon, world.custom, world.customitemarray, world.hints, world.spoiler_mode)
|
||||
ret.teams = world.teams
|
||||
ret.player_names = copy.deepcopy(world.player_names)
|
||||
ret.remote_items = world.remote_items.copy()
|
||||
|
||||
Reference in New Issue
Block a user