Skip to content

Commit

Permalink
Add: show "Unknown" if we don't know the server uses a gamescript (#34)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
TrueBrain authored Jul 17, 2021
1 parent d612693 commit b1daa21
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions webclient/templates/server_entry.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,23 @@ <h1>{% block title %}{{ server["info"]["name"] }} {% endblock %}</h1>
<tr class="even">
<th>Gamescript:</th>
<td>
{% if server["info"]["gamescript_version"] and server["info"]["gamescript_version"] != GAMESCRIPT_VERSION_NONE %}
{{ server["info"]["gamescript_name"] }} (v{{ server["info"]["gamescript_version"] }})
{% else %}
{% if server["info"]["gamescript_version"] is none %}
Unknown
{% elif server["info"]["gamescript_version"] == GAMESCRIPT_VERSION_NONE %}
None
{% else %}
{{ server["info"]["gamescript_name"] }} (v{{ server["info"]["gamescript_version"] }})
{% endif %}
</td>
</tr>
{% if server["info"]["newgrfs"] is not none %}
<tr class="odd">
<th>NewGRFs in use:</th>
<td>
{{ server["info"]["newgrfs"]|length }}
</td>
</tr>
{% endif %}
</tbody>
</table>
{% endblock %}

0 comments on commit b1daa21

Please sign in to comment.