Update stat panel override to work with new map features (#3908)

## About The Pull Request

Pull `code/controllers/subsystem/statpanel.dm` fresh from tg and reapply
our changes, this will let us use the webmap and feedbacklink options in
maps.txt

## Why It's Good For The Game

Cool button

## Proof Of Testing
<details>
<summary>Screenshots/Videos</summary>


![image](https://github.com/user-attachments/assets/14278e78-5d2f-4eb8-a1cd-2252eaae52fa)

</details>

## Changelog

No player facing changes
This commit is contained in:
Roxy
2025-05-26 23:37:26 -04:00
committed by GitHub
parent 43dddcf52e
commit 3d49b8913e
+24 -22
View File
@@ -21,36 +21,38 @@ SUBSYSTEM_DEF(statpanels)
if (!resumed)
num_fires++
var/datum/map_config/cached = SSmap_vote.next_map_config
/* BUBBER EDIT CHANGE BEGIN - Stat Panel - Original:
global_data = list(
"Map: [SSmapping.current_map?.map_name || "Loading..."]",
cached ? "Next Map: [cached.map_name]" : null,
"Round ID: [GLOB.round_id ? GLOB.round_id : "NULL"]",
"Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss", world.timezone)]",
"Round Time: [ROUND_TIME()]",
"Station Time: [station_time_timestamp()]",
"Time Dilation: [round(SStime_track.time_dilation_current,1)]% AVG:([round(SStime_track.time_dilation_avg_fast,1)]%, [round(SStime_track.time_dilation_avg,1)]%, [round(SStime_track.time_dilation_avg_slow,1)]%)",
)
*/
if(isnull(SSmapping.current_map))
global_data = list("Loading")
else if(SSmapping.current_map.feedback_link)
global_data = list(list("Map: [SSmapping.current_map.map_name]", " (Feedback)", "action=openLink&link=[SSmapping.current_map.feedback_link]"))
else
global_data = list("Map: [SSmapping.current_map?.map_name]")
if(SSmapping.current_map?.mapping_url)
global_data += list(list("same_line", " | (View in Browser)", "action=openWebMap"))
if(cached)
global_data += "Next Map: [cached.map_name]"
// BUBBER EDIT ADDITION BEGIN - Extra stat panel info
var/real_round_time = world.timeofday - SSticker.real_round_start_time
var/active_players = get_active_player_count(alive_check = FALSE, afk_check = TRUE, human_check = FALSE) //This is a list of all active players, including players who are dead
var/observing_players = length(GLOB.current_observers_list) //This is a list of all players that started as an observer-- dead and lobby players are not included.
var/current_date = "[time2text(world.realtime, "DDD Month DD")], [CURRENT_STATION_YEAR]"
// BUBBER EDIT ADDITION END - Extra stat panel info
global_data = list(
"Map: [SSmapping.current_map?.map_name || "Loading..."]",
cached ? "Next Map: [cached.map_name]" : null,
global_data += list(
"Round ID: [GLOB.round_id ? GLOB.round_id : "NULL"]",
"Connected: [GLOB.clients.len] | Active: [active_players]/[CONFIG_GET(number/hard_popcap)] | Observing: [observing_players]",
"OOC: [GLOB.ooc_allowed ? "Enabled" : "Disabled"]",
" ",
"Storyteller: [SSgamemode.storyteller ? SSgamemode.storyteller.name : "N/A"]",
"Station Time: [station_time_timestamp(format = "hh:mm")], [current_date]",
"Round Time: [time2text(real_round_time, "hh:mm:ss", 0)]",
"Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")]",
"Connected: [GLOB.clients.len] | Active: [active_players]/[CONFIG_GET(number/hard_popcap)] | Observing: [observing_players]", // BUBBER EDIT ADDITION - Extra stat panel info
"OOC: [GLOB.ooc_allowed ? "Enabled" : "Disabled"]", // BUBBER EDIT ADDITION - Extra stat panel info
" ", // BUBBER EDIT ADDITION - Extra stat panel info
"Storyteller: [SSgamemode.storyteller ? SSgamemode.storyteller.name : "N/A"]", // BUBBER EDIT ADDITION - Extra stat panel info
"Station Time: [station_time_timestamp(format = "hh:mm")], [current_date]", // BUBBER EDIT CHANGE - Extra stat panel info - ORIGINAL: "Station Time: [station_time_timestamp()]"
"Round Time: [time2text(real_round_time, "hh:mm:ss", 0)]", // BUBBER EDIT CHANGE - Extra stat panel info - ORIGINAL: "Round Time: [ROUND_TIME()]"
"Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss", world.timezone)]",
"Time Dilation: [round(SStime_track.time_dilation_current,1)]% AVG:([round(SStime_track.time_dilation_avg_fast,1)]%, [round(SStime_track.time_dilation_avg,1)]%, [round(SStime_track.time_dilation_avg_slow,1)]%)",
)
// BUBBER EDIT CHANGE END
if(SSshuttle.emergency)
var/ETA = SSshuttle.emergency.getModeStr()