mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Add options to generate page (#450)
* Add Item cheat permission to generate page. * Indicate that both remaining_mode and item cheat are disabled in race mode. * Add server_password * refine tooltips and help for server_password and !admin command. * Add Plando options to generation page. * Remove debugging code * Style adjustments and HTML formatting and tag fixes with the goal of making the page nicer looking and not as vertical. Co-authored-by: Chris Wilson <chris@legendserver.info>
This commit is contained in:
@@ -62,7 +62,7 @@ def get_yaml_data(file) -> Union[Dict[str, str], str]:
|
||||
return options
|
||||
|
||||
|
||||
def roll_options(options: Dict[str, Union[dict, str]]) -> Tuple[Dict[str, Union[str, bool]], Dict[str, dict]]:
|
||||
def roll_options(options: Dict[str, Union[dict, str]], plando_options: set = {"bosses", "items", "connections", "texts"}) -> Tuple[Dict[str, Union[str, bool]], Dict[str, dict]]:
|
||||
results = {}
|
||||
rolled_results = {}
|
||||
for filename, text in options.items():
|
||||
@@ -77,11 +77,11 @@ def roll_options(options: Dict[str, Union[dict, str]]) -> Tuple[Dict[str, Union[
|
||||
try:
|
||||
if len(yaml_datas) == 1:
|
||||
rolled_results[filename] = roll_settings(yaml_datas[0],
|
||||
plando_options={"bosses", "items", "connections", "texts"})
|
||||
plando_options=plando_options)
|
||||
else:
|
||||
for i, yaml_data in enumerate(yaml_datas):
|
||||
rolled_results[f"{filename}/{i + 1}"] = roll_settings(yaml_data,
|
||||
plando_options={"bosses", "items", "connections", "texts"})
|
||||
plando_options=plando_options)
|
||||
except Exception as e:
|
||||
results[filename] = f"Failed to generate mystery in {filename}: {e}"
|
||||
else:
|
||||
|
Reference in New Issue
Block a user