fixing up some stuff I broke

This commit is contained in:
qadan 2020-02-08 19:17:34 -04:00
parent e4ab046027
commit c10739e70c
2 changed files with 5 additions and 4 deletions

View File

@ -67,7 +67,6 @@ def main():
if path:
if path not in weights_cache:
weights_cache[path] = get_weights(path)
print(weights_cache[path])
print(f"P{player} Weights: {path} >> {weights_cache[path]['description']}")
erargs = parse_arguments(['--multi', str(args.multi)])
@ -102,8 +101,10 @@ def main():
def get_weights(path):
try:
with open(path, 'rb') as f:
yaml = str(f.read(), "utf-8")
parsed_url = urllib.parse.urlparse(path)
if all(parsed_url.scheme, parsed_url.netloc, parsed_url.path):
with open(path, 'rb') as f:
yaml = str(f.read(), "utf-8")
except Exception as e:
print('Failed to read weights (%s)' % e)
return

2
Rom.py
View File

@ -12,9 +12,9 @@ import subprocess
from BaseClasses import CollectionState, ShopType, Region, Location
from Dungeons import dungeon_music_addresses
from Regions import location_table
from Text import MultiByteTextMapper, CompressedTextMapper, text_addresses, Credits
from Text import TextTable, Uncle_texts, Ganon1_texts, TavernMan_texts, Sahasrahla2_texts, Triforce_texts, Blind_texts, BombShop2_texts, junk_texts
from Text import KingsReturn_texts, Sanctuary_texts, Kakariko_texts, Blacksmiths_texts, DeathMountain_texts, LostWoods_texts, WishingWell_texts, DesertPalace_texts, MountainTower_texts, LinksHouse_texts, Lumberjacks_texts, SickKid_texts, FluteBoy_texts, Zora_texts, MagicShop_texts, Sahasrahla_names
from Utils import output_path, local_path, int16_as_bytes, int32_as_bytes, snes_to_pc
from Items import ItemFactory