diff --git a/webclient/pages/servers.py b/webclient/pages/servers.py index 8b55d9e..ad42d11 100644 --- a/webclient/pages/servers.py +++ b/webclient/pages/servers.py @@ -10,6 +10,7 @@ template, ) +GAMESCRIPT_VERSION_NONE = 4294967295 # (int32)-1 as uint32 MAPSETS = { 0: "Temperate", 1: "Arctic", @@ -165,6 +166,7 @@ def _list_servers(filter): servers_ipv6=servers_ipv6, filter=filter, mapsets=MAPSETS, + GAMESCRIPT_VERSION_NONE=GAMESCRIPT_VERSION_NONE, ) @@ -199,4 +201,10 @@ def server_entry(server_id): expire = datetime.utcfromtimestamp(_server_entry_cache[server_id]["expire"]).strftime("%Y-%m-%d %H:%M:%S") + " UTC" - return template("server_entry.html", server=server, expire=expire, mapsets=MAPSETS) + return template( + "server_entry.html", + server=server, + expire=expire, + mapsets=MAPSETS, + GAMESCRIPT_VERSION_NONE=GAMESCRIPT_VERSION_NONE, + ) diff --git a/webclient/static/img/server-gamescript.png b/webclient/static/img/server-gamescript.png new file mode 100644 index 0000000..501948b Binary files /dev/null and b/webclient/static/img/server-gamescript.png differ diff --git a/webclient/templates/server_entry.html b/webclient/templates/server_entry.html index a498da7..de4f30b 100644 --- a/webclient/templates/server_entry.html +++ b/webclient/templates/server_entry.html @@ -95,6 +95,16 @@

{% block title %}{{ server["info"]["name"] }} {% endblock %}

{% endif %} + + Gamescript: + + {% if server["info"]["gamescript_version"] and server["info"]["gamescript_version"] != GAMESCRIPT_VERSION_NONE %} + {{ server["info"]["gamescript_name"] }} (v{{ server["info"]["gamescript_version"] }}) + {% else %} + None + {% endif %} + + NewGRFs in use: diff --git a/webclient/templates/server_list.html b/webclient/templates/server_list.html index f638388..ad1eef0 100644 --- a/webclient/templates/server_list.html +++ b/webclient/templates/server_list.html @@ -23,6 +23,7 @@

{% block title %} Version + @@ -65,6 +66,11 @@

{% block title %} GRF {% endif %} + + {% if server['info']['gamescript_version'] and server["info"]["gamescript_version"] != GAMESCRIPT_VERSION_NONE %} + GS + {% endif %} + {% endfor %}