From 5910b94debaf03c891a42289bb4ba1d196d7b27b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 20 May 2024 00:26:42 -0400 Subject: [PATCH] Update options pages macros to respect valid_keys for item and location options (#3347) --- WebHostLib/templates/playerOptions/macros.html | 6 +++--- WebHostLib/templates/weightedOptions/macros.html | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/WebHostLib/templates/playerOptions/macros.html b/WebHostLib/templates/playerOptions/macros.html index 64964682fe5f..c4d97255d85e 100644 --- a/WebHostLib/templates/playerOptions/macros.html +++ b/WebHostLib/templates/playerOptions/macros.html @@ -114,7 +114,7 @@ {% macro ItemDict(option_name, option, world) %} {{ OptionTitle(option_name, option) }}
- {% for item_name in world.item_names|sort %} + {% for item_name in (option.valid_keys|sort if (option.valid_keys|length > 0) else world.item_names|sort) %}
@@ -149,7 +149,7 @@ {% if world.location_name_groups.keys()|length > 1 %}
 
{% endif %} - {% for location_name in world.location_names|sort %} + {% for location_name in (option.valid_keys|sort if (option.valid_keys|length > 0) else world.location_names|sort) %}
@@ -172,7 +172,7 @@ {% if world.item_name_groups.keys()|length > 1 %}
 
{% endif %} - {% for item_name in world.item_names|sort %} + {% for item_name in (option.valid_keys|sort if (option.valid_keys|length > 0) else world.item_names|sort) %}
diff --git a/WebHostLib/templates/weightedOptions/macros.html b/WebHostLib/templates/weightedOptions/macros.html index e7caab93c0e2..91474d76960e 100644 --- a/WebHostLib/templates/weightedOptions/macros.html +++ b/WebHostLib/templates/weightedOptions/macros.html @@ -105,7 +105,7 @@ {% macro ItemDict(option_name, option, world) %}
- {% for item_name in world.item_names|sort %} + {% for item_name in (option.valid_keys|sort if (option.valid_keys|length > 0) else world.item_names|sort) %}
1 %}
 
{% endif %} - {% for location_name in world.location_names|sort %} + {% for location_name in (option.valid_keys|sort if (option.valid_keys|length > 0) else world.location_names|sort) %}
@@ -172,7 +172,7 @@ {% if world.item_name_groups.keys()|length > 1 %}
 
{% endif %} - {% for item_name in world.item_names|sort %} + {% for item_name in (option.valid_keys|sort if (option.valid_keys|length > 0) else world.item_names|sort) %}