mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-07 15:13:52 -08:00
Compare commits
6 Commits
0.6.2
...
NewSoupVi-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ac5ae2177 | ||
|
|
45c910f038 | ||
|
|
9a63482b49 | ||
|
|
7ad9495041 | ||
|
|
e22eea056d | ||
|
|
0396559643 |
@@ -735,6 +735,12 @@ class NamedRange(Range):
|
||||
elif value > self.range_end and value not in self.special_range_names.values():
|
||||
raise Exception(f"{value} is higher than maximum {self.range_end} for option {self.__class__.__name__} " +
|
||||
f"and is also not one of the supported named special values: {self.special_range_names}")
|
||||
|
||||
# See docstring
|
||||
for key in self.special_range_names:
|
||||
if key != key.lower():
|
||||
raise Exception(f"{self.__class__.__name__} has an invalid special_range_names key: {key}. "
|
||||
f"NamedRange keys must use only lowercase letters, and ideally should be snake_case.")
|
||||
self.value = value
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -57,9 +57,9 @@
|
||||
<select id="{{ option_name }}-select" data-option-name="{{ option_name }}" {{ "disabled" if option.default == "random" }}>
|
||||
{% for key, val in option.special_range_names.items() %}
|
||||
{% if option.default == val %}
|
||||
<option value="{{ val }}" selected>{{ key }} ({{ val }})</option>
|
||||
<option value="{{ val }}" selected>{{ key|replace("_", " ")|title }} ({{ val }})</option>
|
||||
{% else %}
|
||||
<option value="{{ val }}">{{ key }} ({{ val }})</option>
|
||||
<option value="{{ val }}">{{ key|replace("_", " ")|title }} ({{ val }})</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<option value="custom" hidden>Custom</option>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
The following values have special meanings, and may fall outside the normal range.
|
||||
<ul>
|
||||
{% for name, value in option.special_range_names.items() %}
|
||||
<li>{{ value }}: {{ name }}</li>
|
||||
<li>{{ value }}: {{ name|replace("_", " ")|title }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user