mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Adds configurable round stats link (#17692)
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
var/forum_playerinfo_url
|
||||
/// URL for the CentCom Ban DB API
|
||||
var/centcom_ban_db_url
|
||||
/// URL for the stats page
|
||||
var/round_stats_url
|
||||
|
||||
/datum/configuration_section/url_configuration/load_data(list/data)
|
||||
// Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line
|
||||
@@ -45,3 +47,4 @@
|
||||
CONFIG_LOAD_STR(forum_link_url, data["forum_link_url"])
|
||||
CONFIG_LOAD_STR(forum_playerinfo_url, data["forum_playerinfo_url"])
|
||||
CONFIG_LOAD_STR(centcom_ban_db_url, data["centcomm_ban_db_url"])
|
||||
CONFIG_LOAD_STR(round_stats_url, data["round_stats_url"])
|
||||
|
||||
@@ -141,12 +141,18 @@ GLOBAL_LIST_EMPTY(world_topic_handlers)
|
||||
return
|
||||
#endif
|
||||
|
||||
// Send the stats URL if applicable
|
||||
if(GLOB.configuration.url.round_stats_url && GLOB.round_id)
|
||||
var/stats_link = "[GLOB.configuration.url.round_stats_url][GLOB.round_id]"
|
||||
to_chat(world, "<span class='notice'>Stats for this round can be viewed at <a href=\"[stats_link]\">[stats_link]</a></span>")
|
||||
|
||||
// If the server has been gracefully shutdown in TGS, have a 60 seconds grace period for SQL updates and stuff
|
||||
var/secs_before_auto_reconnect = 10
|
||||
if(GLOB.slower_restart)
|
||||
secs_before_auto_reconnect = 60
|
||||
server_announce_global("Reboot will take a little longer due to pending backend changes.")
|
||||
|
||||
|
||||
// Send the reboot banner to all players
|
||||
for(var/client/C in GLOB.clients)
|
||||
C << output(list2params(list(secs_before_auto_reconnect)), "browseroutput:reboot")
|
||||
|
||||
@@ -781,6 +781,8 @@ donations_url = "https://www.patreon.com/ParadiseStation"
|
||||
ban_appeals_url = "https://www.paradisestation.org/forum/55-unban-requests/"
|
||||
# URL for the CentComm ban DB. Doesnt change much. Ckey is slapped on the end
|
||||
centcomm_ban_db_url = "https://centcom.melonmesa.com/ban/search/"
|
||||
# URL for the game stats page, if applicable. Round ID is appended right on the end. Include a trailing slash if necessary.
|
||||
#round_stats_url = "https://affectedarc07.github.io/ParaStats/#/round/"
|
||||
|
||||
|
||||
################################################################
|
||||
|
||||
Reference in New Issue
Block a user