diff --git a/WebHostLib/options.py b/WebHostLib/options.py index a4d7ccc17c9f..9b6fc9040271 100644 --- a/WebHostLib/options.py +++ b/WebHostLib/options.py @@ -131,6 +131,7 @@ def get_html_doc(option_type: type(Options.Option)) -> str: "type": "items-list", "displayName": option.display_name if hasattr(option, "display_name") else option_name, "description": get_html_doc(option), + "defaultValue": list(option.default) } elif issubclass(option, Options.LocationSet): @@ -138,6 +139,7 @@ def get_html_doc(option_type: type(Options.Option)) -> str: "type": "locations-list", "displayName": option.display_name if hasattr(option, "display_name") else option_name, "description": get_html_doc(option), + "defaultValue": list(option.default) } elif issubclass(option, Options.VerifyKeys): @@ -147,6 +149,7 @@ def get_html_doc(option_type: type(Options.Option)) -> str: "displayName": option.display_name if hasattr(option, "display_name") else option_name, "description": get_html_doc(option), "options": list(option.valid_keys), + "defaultValue": list(option.default) if hasattr(option, "default") else [] } else: diff --git a/WebHostLib/static/assets/weighted-settings.js b/WebHostLib/static/assets/weighted-settings.js index e471e0837a46..11854d3ce045 100644 --- a/WebHostLib/static/assets/weighted-settings.js +++ b/WebHostLib/static/assets/weighted-settings.js @@ -91,7 +91,7 @@ const createDefaultSettings = (settingData) => { case 'items-list': case 'locations-list': case 'custom-list': - newSettings[game][gameSetting] = []; + newSettings[game][gameSetting] = setting.defaultValue; break; default: