Merge branch 'DoorDevVolatile' into Customizer

# Conflicts:
#	Main.py

Also fixed a bug with lite/lean
This commit is contained in:
aerinon
2022-06-22 10:53:06 -06:00
13 changed files with 260 additions and 85 deletions

View File

@@ -0,0 +1,41 @@
import importlib.util
import webbrowser
from tkinter import Tk, Label, Button, Frame
def check_requirements(console=False):
check_packages = {'aenum': 'aenum',
'fast-enum': 'fast_enum',
'python-bps-continued': 'bps',
'colorama': 'colorama',
'aioconsole' : 'aioconsole',
'websockets' : 'websockets',
'pyyaml': 'yaml'}
missing = []
for package, import_name in check_packages.items():
spec = importlib.util.find_spec(import_name)
if spec is None:
missing.append(package)
if len(missing) > 0:
packages = ','.join(missing)
if console:
import logging
logger = logging.getLogger('')
logger.error('You need to install the following python packages:')
logger.error(f'{packages}')
logger.error('See the step about "Installing Platform-specific dependencies":')
logger.error('https://github.com/aerinon/ALttPDoorRandomizer/blob/DoorDev/docs/BUILDING.md')
else:
master = Tk()
master.title('Error')
frame = Frame(master)
frame.pack(expand=True, padx =50, pady=50)
Label(frame, text='You need to install the following python packages:').pack()
Label(frame, text=f'{packages}').pack()
Label(frame, text='See the step about "Installing Platform-specific dependencies":').pack()
url = 'https://github.com/aerinon/ALttPDoorRandomizer/blob/DoorDev/docs/BUILDING.md'
link = Label(frame, fg='blue', cursor='hand2', text=url)
link.pack()
link.bind('<Button-1>', lambda e: webbrowser.open_new_tab(url))
Button(master, text='Ok', command=master.destroy).pack()
master.mainloop()

View File

@@ -947,7 +947,7 @@ def find_entrances_and_exits(avail_pool, entrance_pool):
if item in avail_pool.entrances:
entrances.append(item)
if item in entrance_map and entrance_map[item] in avail_pool.exits:
if item in ['Links House Exit', 'Inverted Links House Exit']:
if entrance_map[item] in ['Links House Exit', 'Inverted Links House Exit']:
targets.append('Chris Houlihan Room Exit')
targets.append(entrance_map[item])
elif item in single_entrance_map and single_entrance_map[item] in avail_pool.exits:
@@ -1837,6 +1837,8 @@ mandatory_connections = [('Links House S&Q', 'Links House'),
('Lake Hylia Central Island Pier', 'Lake Hylia Central Island'),
('Lake Hylia Central Island Teleporter', 'Dark Lake Hylia Central Island'),
('Zoras River', 'Zoras River'),
('Zora Waterfall Entryway', 'Zora Waterfall Entryway'),
('Zora Waterfall Water Drop', 'Light World'),
('Kings Grave Outer Rocks', 'Kings Grave Area'),
('Kings Grave Inner Rocks', 'Light World'),
('Kings Grave Mirror Spot', 'Kings Grave Area'),