Skip to content

Commit b1daa21

Browse files
authored
Add: show "Unknown" if we don't know the server uses a gamescript (#34)
It was now a bit confusing for older servers, as they announced as if they had no gamescript. But we don't know this, as they don't tell us.
1 parent d612693 commit b1daa21

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

webclient/templates/server_entry.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,19 +98,23 @@ <h1>{% block title %}{{ server["info"]["name"] }} {% endblock %}</h1>
9898
<tr class="even">
9999
<th>Gamescript:</th>
100100
<td>
101-
{% if server["info"]["gamescript_version"] and server["info"]["gamescript_version"] != GAMESCRIPT_VERSION_NONE %}
102-
{{ server["info"]["gamescript_name"] }} (v{{ server["info"]["gamescript_version"] }})
103-
{% else %}
101+
{% if server["info"]["gamescript_version"] is none %}
102+
Unknown
103+
{% elif server["info"]["gamescript_version"] == GAMESCRIPT_VERSION_NONE %}
104104
None
105+
{% else %}
106+
{{ server["info"]["gamescript_name"] }} (v{{ server["info"]["gamescript_version"] }})
105107
{% endif %}
106108
</td>
107109
</tr>
110+
{% if server["info"]["newgrfs"] is not none %}
108111
<tr class="odd">
109112
<th>NewGRFs in use:</th>
110113
<td>
111114
{{ server["info"]["newgrfs"]|length }}
112115
</td>
113116
</tr>
117+
{% endif %}
114118
</tbody>
115119
</table>
116120
{% endblock %}

0 commit comments

Comments
 (0)