Files
Bubberstation/code/modules/escape_menu/details.dm
T
oranges 4c48966ff8 Renames delta time to be a more obvious name (#74654)
This tracks the seconds per tick of a subsystem, however note that it is
not completely accurate, as subsystems can be delayed, however it's
useful to have this number as a multiplier or ratio, so that if in
future someone changes the subsystem wait time code correctly adjusts
how fast it applies effects

regexes used

git grep --files-with-matches --name-only 'DT_PROB' | xargs -l sed -i
's/DT_PROB/SPT_PROB/g'
git grep --files-with-matches --name-only 'delta_time' | xargs -l sed -i
's/delta_time/seconds_per_tick/g'
2023-04-11 21:31:07 -07:00

44 lines
1.3 KiB
Plaintext

// This doesn't instantiate right away, since we rely on other GLOBs
GLOBAL_DATUM(escape_menu_details, /atom/movable/screen/escape_menu/details)
/// Provides a singleton for the escape menu details screen.
/proc/give_escape_menu_details()
if (isnull(GLOB.escape_menu_details))
GLOB.escape_menu_details = new
return GLOB.escape_menu_details
/atom/movable/screen/escape_menu/details
screen_loc = "EAST:-180,NORTH:-25"
maptext_height = 100
maptext_width = 200
/atom/movable/screen/escape_menu/details/Initialize(mapload)
. = ..()
update_text()
START_PROCESSING(SSescape_menu, src)
/atom/movable/screen/escape_menu/details/Destroy()
if (GLOB.escape_menu_details == src)
stack_trace("Something tried to delete the escape menu details screen")
return QDEL_HINT_LETMELIVE
STOP_PROCESSING(SSescape_menu, src)
return ..()
/atom/movable/screen/escape_menu/details/process(seconds_per_tick)
update_text()
/atom/movable/screen/escape_menu/details/proc/update_text()
var/new_maptext = {"
<span style='text-align: right; line-height: 0.7'>
Round ID: [GLOB.round_id || "Unset"]<br />
Round Time: [ROUND_TIME()]<br />
Map: [SSmapping.config?.map_name || "Loading..."]<br />
Time Dilation: [round(SStime_track.time_dilation_current,1)]%<br />
</span>
"}
maptext = MAPTEXT(new_maptext)