mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 11:38:12 +01:00
Port tg statpanel (#16463)
* Port tg statpanel * Add verb descriptions using the title attribute * Fix a dreamchecker error * Remove chomp edits * Add mentor tickets to ticket panel --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Kashargul
parent
ed5fc193f7
commit
c07027136e
@@ -16,4 +16,4 @@
|
||||
|
||||
/datum/controller/proc/Recover()
|
||||
|
||||
/datum/controller/proc/stat_entry()
|
||||
/datum/controller/proc/stat_entry(msg)
|
||||
|
||||
@@ -96,8 +96,9 @@ var/datum/controller/failsafe/Failsafe
|
||||
/datum/controller/failsafe/proc/defcon_pretty()
|
||||
return defcon
|
||||
|
||||
/datum/controller/failsafe/stat_entry()
|
||||
/datum/controller/failsafe/stat_entry(msg)
|
||||
if(!statclick)
|
||||
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
|
||||
|
||||
stat("Failsafe Controller:", statclick.update("Defcon: [defcon_pretty()] (Interval: [Failsafe.processing_interval] | Iteration: [Failsafe.master_iteration])"))
|
||||
msg = "Failsafe Controller: [statclick.update("Defcon: [defcon_pretty()] (Interval: [Failsafe.processing_interval] | Iteration: [Failsafe.master_iteration])")]"
|
||||
return msg
|
||||
|
||||
@@ -32,11 +32,12 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars)
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/controller/global_vars/stat_entry()
|
||||
/datum/controller/global_vars/stat_entry(msg)
|
||||
if(!statclick)
|
||||
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
|
||||
|
||||
stat("GLOB:", statclick.update("Edit"))
|
||||
msg = "GLOB: [statclick.update("Edit")]"
|
||||
return msg
|
||||
|
||||
/datum/controller/global_vars/vv_edit_var(var_name, var_value)
|
||||
if(gvars_datum_protected_varlist[var_name])
|
||||
|
||||
@@ -582,12 +582,14 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
|
||||
|
||||
|
||||
/datum/controller/master/stat_entry()
|
||||
/datum/controller/master/stat_entry(msg)
|
||||
if(!statclick)
|
||||
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
|
||||
|
||||
stat("Byond:", "(FPS:[world.fps]) (TickCount:[world.time/world.tick_lag]) (TickDrift:[round(Master.tickdrift,1)]([round((Master.tickdrift/(world.time/world.tick_lag))*100,0.1)]%))")
|
||||
stat("Master Controller:", statclick.update("(TickRate:[Master.processing]) (Iteration:[Master.iteration])"))
|
||||
msg = "Byond: (FPS:[world.fps]) (TickCount:[world.time/world.tick_lag]) (TickDrift:[round(Master.tickdrift,1)]([round((Master.tickdrift/(world.time/world.tick_lag))*100,0.1)]%))"
|
||||
msg += "Master Controller: [statclick.update("(TickRate:[Master.processing]) (Iteration:[Master.iteration])")]"
|
||||
|
||||
return msg
|
||||
|
||||
/datum/controller/master/StartLoadingMap(var/quiet = TRUE)
|
||||
if(map_loading)
|
||||
|
||||
@@ -164,22 +164,11 @@
|
||||
|
||||
//hook for printing stats to the "MC" statuspanel for admins to see performance and related stats etc.
|
||||
/datum/controller/subsystem/stat_entry(msg)
|
||||
if(!statclick)
|
||||
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
|
||||
|
||||
|
||||
if(SS_NO_FIRE & flags)
|
||||
msg = "NO FIRE\t[msg]"
|
||||
else if(can_fire <= 0)
|
||||
msg = "OFFLINE\t[msg]"
|
||||
else
|
||||
if(can_fire && !(SS_NO_FIRE & flags))
|
||||
msg = "[round(cost,1)]ms|[round(tick_usage,1)]%([round(tick_overrun,1)]%)|[round(ticks,0.1)]\t[msg]"
|
||||
|
||||
var/title = name
|
||||
if (can_fire)
|
||||
title = "\[[state_letter()]][title]"
|
||||
|
||||
stat(title, statclick.update(msg))
|
||||
else
|
||||
msg = "OFFLINE\t[msg]"
|
||||
return msg
|
||||
|
||||
/datum/controller/subsystem/proc/state_letter()
|
||||
switch (state)
|
||||
|
||||
@@ -12,8 +12,9 @@ SUBSYSTEM_DEF(ai)
|
||||
var/slept_mobs = 0
|
||||
var/list/process_z = list()
|
||||
|
||||
/datum/controller/subsystem/ai/stat_entry(msg_prefix)
|
||||
..("P: [processing.len] | S: [slept_mobs]")
|
||||
/datum/controller/subsystem/ai/stat_entry(msg)
|
||||
msg = "P: [processing.len] | S: [slept_mobs]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/ai/fire(resumed = 0)
|
||||
if (!resumed)
|
||||
|
||||
@@ -9,10 +9,9 @@ SUBSYSTEM_DEF(aifast)
|
||||
var/list/processing = list()
|
||||
var/list/currentrun = list()
|
||||
|
||||
/datum/controller/subsystem/aifast/stat_entry(msg_prefix)
|
||||
var/list/msg = list(msg_prefix)
|
||||
msg += "P:[processing.len]"
|
||||
..(msg.Join())
|
||||
/datum/controller/subsystem/aifast/stat_entry(msg)
|
||||
msg = "P:[processing.len]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/aifast/fire(resumed = 0)
|
||||
if (!resumed)
|
||||
|
||||
@@ -244,9 +244,8 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/air/stat_entry(msg_prefix)
|
||||
var/list/msg = list(msg_prefix)
|
||||
msg += "S:[current_step ? part_names[current_step] : ""] "
|
||||
/datum/controller/subsystem/air/stat_entry(msg)
|
||||
msg = "S:[current_step ? part_names[current_step] : ""] "
|
||||
msg += "C:{"
|
||||
msg += "T [round(cost_turfs, 1)] | "
|
||||
msg += "E [round(cost_edges, 1)] | "
|
||||
@@ -263,7 +262,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
|
||||
msg += "H [active_hotspots.len] | "
|
||||
msg += "Z [zones_to_update.len] "
|
||||
msg += "}"
|
||||
..(msg.Join())
|
||||
return ..()
|
||||
|
||||
// ZAS might displace objects as the map loads if an air tick is processed mid-load.
|
||||
/datum/controller/subsystem/air/StartLoadingMap(var/quiet = TRUE)
|
||||
|
||||
@@ -41,5 +41,6 @@ SUBSYSTEM_DEF(alarm)
|
||||
/datum/controller/subsystem/alarm/proc/number_of_active_alarms()
|
||||
return active_alarm_cache.len
|
||||
|
||||
/datum/controller/subsystem/alarm/stat_entry()
|
||||
..("[number_of_active_alarms()] alarm\s")
|
||||
/datum/controller/subsystem/alarm/stat_entry(msg)
|
||||
msg = "[number_of_active_alarms()] alarm\s"
|
||||
return ..()
|
||||
|
||||
@@ -20,8 +20,9 @@ SUBSYSTEM_DEF(chemistry)
|
||||
initialize_chemical_reactions()
|
||||
..()
|
||||
|
||||
/datum/controller/subsystem/chemistry/stat_entry()
|
||||
..("C: [chemical_reagents.len] | R: [chemical_reactions.len]")
|
||||
/datum/controller/subsystem/chemistry/stat_entry(msg)
|
||||
msg = "C: [chemical_reagents.len] | R: [chemical_reactions.len]"
|
||||
return ..()
|
||||
|
||||
//Chemical Reactions - Initialises all /decl/chemical_reaction into a list
|
||||
// It is filtered into multiple lists within a list.
|
||||
@@ -43,7 +44,7 @@ SUBSYSTEM_DEF(chemistry)
|
||||
// add_to = fusion_reactions_by_reagent
|
||||
if(istype(D, /decl/chemical_reaction/distilling))
|
||||
add_to = distilled_reactions_by_reagent
|
||||
|
||||
|
||||
LAZYINITLIST(add_to[reagent_id])
|
||||
add_to[reagent_id] += D
|
||||
|
||||
|
||||
@@ -41,8 +41,9 @@ SUBSYSTEM_DEF(events)
|
||||
var/datum/event_container/EC = event_containers[i]
|
||||
EC.process()
|
||||
|
||||
/datum/controller/subsystem/events/stat_entry()
|
||||
..("E:[active_events.len]")
|
||||
/datum/controller/subsystem/events/stat_entry(msg)
|
||||
msg = "E:[active_events.len]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/events/Recover()
|
||||
if(SSevents.active_events)
|
||||
|
||||
@@ -56,8 +56,9 @@ SUBSYSTEM_DEF(inactivity)
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/inactivity/stat_entry()
|
||||
..("Kicked: [number_kicked]")
|
||||
/datum/controller/subsystem/inactivity/stat_entry(msg)
|
||||
msg = "Kicked: [number_kicked]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/inactivity/proc/can_kick(var/client/C)
|
||||
if(C.holder) return FALSE //VOREStation Add - Don't kick admins.
|
||||
|
||||
@@ -82,9 +82,8 @@ SUBSYSTEM_DEF(machines)
|
||||
T.broadcast_status()
|
||||
CHECK_TICK
|
||||
|
||||
/datum/controller/subsystem/machines/stat_entry()
|
||||
var/msg = list()
|
||||
msg += "C:{"
|
||||
/datum/controller/subsystem/machines/stat_entry(msg)
|
||||
msg = "C:{"
|
||||
msg += "PI:[round(cost_pipenets,1)]|"
|
||||
msg += "MC:[round(cost_machinery,1)]|"
|
||||
msg += "PN:[round(cost_powernets,1)]|"
|
||||
@@ -95,7 +94,7 @@ SUBSYSTEM_DEF(machines)
|
||||
msg += "PN:[SSmachines.powernets.len]|"
|
||||
msg += "PO:[SSmachines.powerobjs.len]|"
|
||||
msg += "MC/MS:[round((cost ? SSmachines.processing_machines.len/cost_machinery : 0),0.1)]"
|
||||
..(jointext(msg, null))
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/machines/proc/process_pipenets(resumed = 0)
|
||||
if (!resumed)
|
||||
|
||||
@@ -19,8 +19,9 @@ SUBSYSTEM_DEF(mobs)
|
||||
var/slept_mobs = 0
|
||||
var/list/process_z = list()
|
||||
|
||||
/datum/controller/subsystem/mobs/stat_entry()
|
||||
..("P: [global.mob_list.len] | S: [slept_mobs]")
|
||||
/datum/controller/subsystem/mobs/stat_entry(msg)
|
||||
msg = "P: [global.mob_list.len] | S: [slept_mobs]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/mobs/fire(resumed = 0)
|
||||
if (!resumed)
|
||||
@@ -90,4 +91,4 @@ SUBSYSTEM_DEF(mobs)
|
||||
|
||||
/datum/controller/subsystem/mobs/critfail()
|
||||
..()
|
||||
log_recent()
|
||||
log_recent()
|
||||
|
||||
@@ -7,8 +7,9 @@ SUBSYSTEM_DEF(orbit)
|
||||
var/list/currentrun = list()
|
||||
var/list/processing = list()
|
||||
|
||||
/datum/controller/subsystem/orbit/stat_entry()
|
||||
..("P:[processing.len]")
|
||||
/datum/controller/subsystem/orbit/stat_entry(msg)
|
||||
msg = "P:[processing.len]"
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/controller/subsystem/orbit/fire(resumed = 0)
|
||||
@@ -40,5 +41,3 @@ SUBSYSTEM_DEF(orbit)
|
||||
O.Check(targetloc)
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -32,8 +32,9 @@ SUBSYSTEM_DEF(overlays)
|
||||
fire(FALSE, TRUE)
|
||||
..()
|
||||
|
||||
/datum/controller/subsystem/overlays/stat_entry()
|
||||
..("Queued Atoms: [queue.len], Cache Size: [cache_size]")
|
||||
/datum/controller/subsystem/overlays/stat_entry(msg)
|
||||
msg = "Queued Atoms: [queue.len], Cache Size: [cache_size]"
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/controller/subsystem/overlays/fire(resumed, no_mc_tick)
|
||||
|
||||
@@ -12,8 +12,9 @@ SUBSYSTEM_DEF(ping)
|
||||
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
|
||||
var/list/currentrun = list()
|
||||
|
||||
/datum/controller/subsystem/ping/stat_entry()
|
||||
..("P:[GLOB.clients.len]")
|
||||
/datum/controller/subsystem/ping/stat_entry(msg)
|
||||
msg = "P:[GLOB.clients.len]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/ping/fire(resumed = FALSE)
|
||||
// Prepare the new batch of clients
|
||||
|
||||
@@ -22,8 +22,9 @@ SUBSYSTEM_DEF(plants)
|
||||
var/list/processing = list()
|
||||
var/list/currentrun = list()
|
||||
|
||||
/datum/controller/subsystem/plants/stat_entry()
|
||||
..("P:[processing.len]|S:[seeds.len]")
|
||||
/datum/controller/subsystem/plants/stat_entry(msg)
|
||||
msg = "P:[processing.len]|S:[seeds.len]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/plants/Initialize(timeofday)
|
||||
setup()
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
PROCESSING_SUBSYSTEM_DEF(obj_tab_items)
|
||||
name = "Obj Tab Items"
|
||||
flags = SS_NO_INIT
|
||||
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
|
||||
wait = 0.1 SECONDS
|
||||
|
||||
// I know this is mostly copypasta, but I want to change the processing logic
|
||||
// Sorry bestie :(
|
||||
/datum/controller/subsystem/processing/obj_tab_items/fire(resumed = FALSE)
|
||||
if (!resumed)
|
||||
currentrun = processing.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/current_run = currentrun
|
||||
|
||||
while(current_run.len)
|
||||
var/datum/thing = current_run[current_run.len]
|
||||
if(QDELETED(thing))
|
||||
processing -= thing
|
||||
else if(thing.process(wait * 0.1) == PROCESS_KILL)
|
||||
// fully stop so that a future START_PROCESSING will work
|
||||
STOP_PROCESSING(src, thing)
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
current_run.len--
|
||||
@@ -24,8 +24,9 @@ SUBSYSTEM_DEF(processing)
|
||||
if(CHECK_BITFIELD(D.datum_flags, DF_ISPROCESSING))
|
||||
processing |= D
|
||||
|
||||
/datum/controller/subsystem/processing/stat_entry()
|
||||
..("[stat_tag]:[processing.len]")
|
||||
/datum/controller/subsystem/processing/stat_entry(msg)
|
||||
msg = "[stat_tag]:[processing.len]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/processing/fire(resumed = 0)
|
||||
if (!resumed)
|
||||
@@ -69,14 +70,14 @@ SUBSYSTEM_DEF(processing)
|
||||
log_world(msg)
|
||||
return
|
||||
msg += "Lists: current_run: [currentrun.len], processing: [processing.len]\n"
|
||||
|
||||
|
||||
if(!currentrun.len)
|
||||
msg += "!!The subsystem just finished the processing list, and currentrun is empty (or has never run).\n"
|
||||
msg += "!!The info below is the tail of processing instead of currentrun.\n"
|
||||
|
||||
|
||||
var/datum/D = currentrun.len ? currentrun[currentrun.len] : processing[processing.len]
|
||||
msg += "Tail entry: [describeThis(D)] (this is likely the item AFTER the problem item)\n"
|
||||
|
||||
|
||||
var/position = processing.Find(D)
|
||||
if(!position)
|
||||
msg += "Unable to find context of tail entry in processing list.\n"
|
||||
|
||||
@@ -54,8 +54,9 @@ SUBSYSTEM_DEF(radiation)
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/radiation/stat_entry()
|
||||
..("S:[sources.len], RC:[resistance_cache.len]")
|
||||
/datum/controller/subsystem/radiation/stat_entry(msg)
|
||||
msg = "S:[sources.len], RC:[resistance_cache.len]"
|
||||
return ..()
|
||||
|
||||
// Ray trace from all active radiation sources to T and return the strongest effect.
|
||||
/datum/controller/subsystem/radiation/proc/get_rads_at_turf(var/turf/T)
|
||||
@@ -144,4 +145,4 @@ SUBSYSTEM_DEF(radiation)
|
||||
if(!(power && source))
|
||||
return
|
||||
var/turf/epicentre = locate(round(world.maxx / 2), round(world.maxy / 2), source.z)
|
||||
flat_radiate(epicentre, power, world.maxx, respect_maint)
|
||||
flat_radiate(epicentre, power, world.maxx, respect_maint)
|
||||
|
||||
@@ -172,5 +172,6 @@ SUBSYSTEM_DEF(shuttles)
|
||||
for(var/obj/effect/overmap/visitable/ship/ship_effect as anything in ships)
|
||||
overmap_halted ? ship_effect.halt() : ship_effect.unhalt()
|
||||
|
||||
/datum/controller/subsystem/shuttles/stat_entry()
|
||||
..("Shuttles:[process_shuttles.len]/[shuttles.len], Ships:[ships.len], L:[registered_shuttle_landmarks.len][overmap_halted ? ", HALT" : ""]")
|
||||
/datum/controller/subsystem/shuttles/stat_entry(msg)
|
||||
msg = "Shuttles:[process_shuttles.len]/[shuttles.len], Ships:[ships.len], L:[registered_shuttle_landmarks.len][overmap_halted ? ", HALT" : ""]"
|
||||
return ..()
|
||||
|
||||
@@ -0,0 +1,481 @@
|
||||
SUBSYSTEM_DEF(statpanels)
|
||||
name = "Stat Panels"
|
||||
wait = 4
|
||||
init_order = INIT_ORDER_STATPANELS
|
||||
//init_stage = INITSTAGE_EARLY
|
||||
priority = FIRE_PRIORITY_STATPANEL
|
||||
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
|
||||
flags = SS_NO_INIT
|
||||
var/list/currentrun = list()
|
||||
var/list/global_data
|
||||
var/list/mc_data
|
||||
var/list/cached_images = list()
|
||||
|
||||
///how many subsystem fires between most tab updates
|
||||
var/default_wait = 10
|
||||
///how many subsystem fires between updates of misc tabs
|
||||
var/misc_wait = 3
|
||||
///how many subsystem fires between updates of the status tab
|
||||
var/status_wait = 2
|
||||
///how many subsystem fires between updates of the MC tab
|
||||
var/mc_wait = 5
|
||||
///how many full runs this subsystem has completed. used for variable rate refreshes.
|
||||
var/num_fires = 0
|
||||
|
||||
/datum/controller/subsystem/statpanels/fire(resumed = FALSE)
|
||||
if (!resumed)
|
||||
num_fires++
|
||||
//var/datum/map_config/cached = SSmapping.next_map_config
|
||||
global_data = list(
|
||||
//"Map: [SSmapping.config?.map_name || "Loading..."]",
|
||||
"Map: [using_map.name]",
|
||||
//cached ? "Next Map: [cached.map_name]" : null,
|
||||
//"Next Map: -- Not Available --",
|
||||
// "Round ID: [GLOB.round_id ? GLOB.round_id : "NULL"]",
|
||||
"Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")]",
|
||||
"Round Time: [ROUND_TIME()]",
|
||||
"Station Date: [stationdate2text()]", // [capitalize(GLOB.world_time_season)]",
|
||||
"Station Time: [stationtime2text()]",
|
||||
"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(emergency_shuttle.evac)
|
||||
var/ETA = emergency_shuttle.get_status_panel_eta()
|
||||
if(ETA)
|
||||
global_data += "[ETA]"
|
||||
src.currentrun = GLOB.clients.Copy()
|
||||
mc_data = null
|
||||
|
||||
var/list/currentrun = src.currentrun
|
||||
while(length(currentrun))
|
||||
var/client/target = currentrun[length(currentrun)]
|
||||
currentrun.len--
|
||||
|
||||
if(!target?.stat_panel?.is_ready()) // Null target client, client has null stat panel, or stat panel isn't ready
|
||||
continue
|
||||
|
||||
if(target.stat_tab == "Status" && num_fires % status_wait == 0)
|
||||
set_status_tab(target)
|
||||
|
||||
if(!target.holder)
|
||||
target.stat_panel.send_message("remove_admin_tabs")
|
||||
else
|
||||
//target.stat_panel.send_message("update_split_admin_tabs", !!(target.prefs.toggles & SPLIT_ADMIN_TABS))
|
||||
target.stat_panel.send_message("update_split_admin_tabs", FALSE)
|
||||
|
||||
if(!("MC" in target.panel_tabs) || !("Tickets" in target.panel_tabs))
|
||||
target.stat_panel.send_message("add_admin_tabs", target.holder.href_token)
|
||||
|
||||
//if(target.stat_tab == "MC" && ((num_fires % mc_wait == 0) || target?.prefs.read_preference(/datum/preference/toggle/fast_mc_refresh)))
|
||||
//set_MC_tab(target)
|
||||
if(target.stat_tab == "MC" && ((num_fires % mc_wait == 0)))
|
||||
set_MC_tab(target)
|
||||
|
||||
if(target.stat_tab == "Tickets" && num_fires % default_wait == 0)
|
||||
set_tickets_tab(target)
|
||||
|
||||
if(!length(GLOB.sdql2_queries) && ("SDQL2" in target.panel_tabs))
|
||||
target.stat_panel.send_message("remove_sdql2")
|
||||
|
||||
else if(length(GLOB.sdql2_queries) && (target.stat_tab == "SDQL2" || !("SDQL2" in target.panel_tabs)) && num_fires % default_wait == 0)
|
||||
set_SDQL2_tab(target)
|
||||
|
||||
if(target.mob)
|
||||
var/mob/target_mob = target.mob
|
||||
|
||||
// Handle the action panels of the stat panel
|
||||
|
||||
var/update_actions = FALSE
|
||||
// We're on a spell tab, update the tab so we can see cooldowns progressing and such
|
||||
if(target.stat_tab in target.spell_tabs)
|
||||
update_actions = TRUE
|
||||
// We're not on a spell tab per se, but we have cooldown actions, and we've yet to
|
||||
// set up our spell tabs at all
|
||||
//if(!length(target.spell_tabs) && locate(/datum/action/cooldown) in target_mob.actions)
|
||||
//update_actions = TRUE
|
||||
|
||||
if(update_actions && num_fires % default_wait == 0)
|
||||
set_action_tabs(target, target_mob)
|
||||
//Update every fire if tab is open, otherwise update every 7 fires
|
||||
if((num_fires % misc_wait == 0))
|
||||
update_misc_tabs(target,target_mob)
|
||||
|
||||
var/datum/object_window_info/obj_window = target.obj_window
|
||||
if(obj_window)
|
||||
if(obj_window.flags & TURFLIST_UPDATE_QUEUED)
|
||||
immediate_send_stat_data(target)
|
||||
obj_window.flags = 0
|
||||
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/statpanels/proc/update_misc_tabs(var/client/target,var/mob/target_mob)
|
||||
target_mob.update_misc_tabs()
|
||||
for(var/tab in target_mob.misc_tabs)
|
||||
if(target_mob.misc_tabs[tab].len == 0 && (tab in target.misc_tabs))
|
||||
target.misc_tabs -= tab
|
||||
target.stat_panel.send_message("remove_misc",tab)
|
||||
|
||||
if(target_mob.misc_tabs[tab].len > 0)
|
||||
if(!(tab in target.misc_tabs))
|
||||
target.misc_tabs += tab
|
||||
target.stat_panel.send_message("create_misc",tab)
|
||||
target.stat_panel.send_message("update_misc",list(
|
||||
TN = tab, \
|
||||
TC = target_mob.misc_tabs[tab], \
|
||||
))
|
||||
|
||||
for(var/tab in target.misc_tabs)
|
||||
if(!(tab in target_mob.misc_tabs))
|
||||
target.misc_tabs -= tab
|
||||
target.stat_panel.send_message("remove_misc",tab)
|
||||
|
||||
/datum/controller/subsystem/statpanels/proc/set_status_tab(client/target)
|
||||
if(!global_data)//statbrowser hasnt fired yet and we were called from immediate_send_stat_data()
|
||||
return
|
||||
|
||||
target.stat_panel.send_message("update_stat", list(
|
||||
global_data = global_data,
|
||||
ping_str = "Ping: -- Not Available --", // [round(target.lastping, 1)]ms (Average: [round(target.avgping, 1)]ms)",
|
||||
other_str = target.mob?.get_status_tab_items(),
|
||||
))
|
||||
|
||||
/datum/controller/subsystem/statpanels/proc/set_MC_tab(client/target)
|
||||
var/turf/eye_turf = get_turf(target.eye)
|
||||
var/coord_entry = COORD(eye_turf)
|
||||
if(!mc_data)
|
||||
generate_mc_data()
|
||||
target.stat_panel.send_message("update_mc", list(mc_data = mc_data, coord_entry = coord_entry))
|
||||
|
||||
/datum/controller/subsystem/statpanels/proc/set_examine_tab(client/target)
|
||||
var/description_holders = target.description_holders
|
||||
var/list/examine_update = list()
|
||||
|
||||
if(!target.obj_window)
|
||||
target.obj_window = new(target)
|
||||
if(!target.examine_icon && !target.obj_window.examine_target && target.stat_tab == "Examine")
|
||||
target.obj_window.examine_target = description_holders["icon"]
|
||||
target.obj_window.atoms_to_show += target.obj_window.examine_target
|
||||
START_PROCESSING(SSobj_tab_items, target.obj_window)
|
||||
refresh_client_obj_view(target)
|
||||
examine_update += "[target.examine_icon] <font size='5'>[description_holders["name"]]</font>" //The name, written in big letters.
|
||||
examine_update += "[description_holders["desc"]]" //the default examine text.
|
||||
if(description_holders["info"])
|
||||
examine_update += "<font color='#084B8A'>" + span_bold("[replacetext(description_holders["info"], "\n", "<BR>")]") + "</font><br />" //Blue, informative text.
|
||||
if(description_holders["interactions"])
|
||||
for(var/line in description_holders["interactions"])
|
||||
examine_update += "<font color='#084B8A'>" + span_bold("[line]") + "</font><br />"
|
||||
if(description_holders["fluff"])
|
||||
examine_update += "<font color='#298A08'>" + span_bold("[replacetext(description_holders["fluff"], "\n", "<BR>")]") + "</font><br />" //Green, fluff-related text.
|
||||
if(description_holders["antag"])
|
||||
examine_update += "<font color='#8A0808'>" + span_bold("[description_holders["antag"]]") + "</font><br />" //Red, malicious antag-related text
|
||||
|
||||
target.stat_panel.send_message("update_examine", examine_update)
|
||||
|
||||
/datum/controller/subsystem/statpanels/proc/set_tickets_tab(client/target)
|
||||
var/list/tickets = GLOB.ahelp_tickets.stat_entry(target)
|
||||
tickets += GLOB.mhelp_tickets.stat_entry(target)
|
||||
target.stat_panel.send_message("update_tickets", tickets)
|
||||
|
||||
/datum/controller/subsystem/statpanels/proc/set_SDQL2_tab(client/target)
|
||||
var/list/sdql2A = list()
|
||||
sdql2A[++sdql2A.len] = list("", "Access Global SDQL2 List", REF(GLOB.sdql2_vv_statobj))
|
||||
var/list/sdql2B = list()
|
||||
for(var/datum/SDQL2_query/query as anything in GLOB.sdql2_queries)
|
||||
sdql2B = query.generate_stat()
|
||||
|
||||
sdql2A += sdql2B
|
||||
target.stat_panel.send_message("update_sdql2", sdql2A)
|
||||
|
||||
/// Set up the various action tabs.
|
||||
/datum/controller/subsystem/statpanels/proc/set_action_tabs(client/target, mob/target_mob)
|
||||
return
|
||||
//var/list/actions = target_mob.get_actions_for_statpanel()
|
||||
//target.spell_tabs.Cut()
|
||||
|
||||
//for(var/action_data in actions)
|
||||
// target.spell_tabs |= action_data[1]
|
||||
|
||||
//target.stat_panel.send_message("update_spells", list(spell_tabs = target.spell_tabs, actions = actions))
|
||||
|
||||
/datum/controller/subsystem/statpanels/proc/set_turf_examine_tab(client/target, mob/target_mob)
|
||||
if(!target)//statbrowser hasnt fired yet and we were called from immediate_send_stat_data()
|
||||
return
|
||||
var/list/overrides = list()
|
||||
for(var/image/target_image as anything in target.images)
|
||||
if(!target_image.loc || target_image.loc.loc != target_mob.listed_turf || !target_image.override)
|
||||
continue
|
||||
overrides += target_image.loc
|
||||
|
||||
var/list/atoms_to_display = list(target_mob.listed_turf)
|
||||
for(var/atom/movable/turf_content as anything in target_mob.listed_turf)
|
||||
if(turf_content.mouse_opacity == MOUSE_OPACITY_TRANSPARENT)
|
||||
continue
|
||||
if(turf_content.invisibility > target_mob.see_invisible)
|
||||
continue
|
||||
if(turf_content in overrides)
|
||||
continue
|
||||
//if(turf_content.IsObscured())
|
||||
//continue
|
||||
atoms_to_display += turf_content
|
||||
|
||||
/// Set the atoms we're meant to display
|
||||
var/datum/object_window_info/obj_window = target.obj_window
|
||||
if(!obj_window)
|
||||
return // previous one no longer exists
|
||||
obj_window.atoms_to_show = atoms_to_display
|
||||
START_PROCESSING(SSobj_tab_items, obj_window)
|
||||
refresh_client_obj_view(target)
|
||||
|
||||
/datum/controller/subsystem/statpanels/proc/refresh_client_obj_view(client/refresh)
|
||||
var/list/turf_items = return_object_images(refresh)
|
||||
if(!length(turf_items)/* || !refresh.mob?.listed_turf*/)
|
||||
return
|
||||
refresh.stat_panel.send_message("update_listedturf", turf_items)
|
||||
|
||||
#define OBJ_IMAGE_LOADING "statpanels obj loading temporary"
|
||||
/// Returns all our ready object tab images
|
||||
/// Returns a list in the form list(list(object_name, object_ref, loaded_image), ...)
|
||||
/datum/controller/subsystem/statpanels/proc/return_object_images(client/load_from)
|
||||
// You might be inclined to think that this is a waste of cpu time, since we
|
||||
// A: Double iterate over atoms in the build case, or
|
||||
// B: Generate these lists over and over in the refresh case
|
||||
// It's really not very hot. The hot portion of this code is genuinely mostly in the image generation
|
||||
// So it's ok to pay a performance cost for cleanliness here
|
||||
|
||||
// No turf? go away
|
||||
/*if(!load_from.mob?.listed_turf)
|
||||
return list()*/
|
||||
var/datum/object_window_info/obj_window = load_from.obj_window
|
||||
var/list/already_seen = obj_window.atoms_to_images
|
||||
var/list/to_make = obj_window.atoms_to_imagify
|
||||
var/list/turf_items = list()
|
||||
for(var/atom/turf_item as anything in obj_window.atoms_to_show)
|
||||
// First, we fill up the list of refs to display
|
||||
// If we already have one, just use that
|
||||
var/existing_image = already_seen[turf_item]
|
||||
if(existing_image == OBJ_IMAGE_LOADING)
|
||||
continue
|
||||
// We already have it. Success!
|
||||
if(existing_image)
|
||||
if(turf_item == obj_window.examine_target) //not actually a turf item get trolled
|
||||
load_from.examine_icon = "<img src=\"[existing_image]\" />"
|
||||
obj_window.examine_target = null
|
||||
set_examine_tab(load_from)
|
||||
continue
|
||||
turf_items[++turf_items.len] = list("[turf_item.name]", REF(turf_item), existing_image)
|
||||
continue
|
||||
// Now, we're gonna queue image generation out of those refs
|
||||
to_make += turf_item
|
||||
already_seen[turf_item] = OBJ_IMAGE_LOADING
|
||||
obj_window.RegisterSignal(turf_item, COMSIG_PARENT_QDELETING, TYPE_PROC_REF(/datum/object_window_info,viewing_atom_deleted)) // we reset cache if anything in it gets deleted
|
||||
return turf_items
|
||||
|
||||
#undef OBJ_IMAGE_LOADING
|
||||
|
||||
/datum/controller/subsystem/statpanels/proc/generate_mc_data()
|
||||
mc_data = list(
|
||||
list("CPU:", world.cpu),
|
||||
list("Instances:", "[num2text(world.contents.len, 10)]"),
|
||||
list("World Time:", "[world.time]"),
|
||||
list("Globals:", GLOB.stat_entry(), "\ref[GLOB]"),
|
||||
// list("[config]:", config.stat_entry(), "\ref[config]"),
|
||||
list("Byond:", "(FPS:[world.fps]) (TickCount:[world.time/world.tick_lag]) (TickDrift:[round(Master.tickdrift,1)]([round((Master.tickdrift/(world.time/world.tick_lag))*100,0.1)]%)) (Internal Tick Usage: [round(MAPTICK_LAST_INTERNAL_TICK_USAGE,0.1)]%)"),
|
||||
list("Master Controller:", Master.stat_entry(), "\ref[Master]"),
|
||||
list("Failsafe Controller:", Failsafe.stat_entry(), "\ref[Failsafe]"),
|
||||
list("","")
|
||||
)
|
||||
for(var/datum/controller/subsystem/sub_system as anything in Master.subsystems)
|
||||
mc_data[++mc_data.len] = list("\[[sub_system.state_letter()]][sub_system.name]", sub_system.stat_entry(), "\ref[sub_system]")
|
||||
mc_data[++mc_data.len] = list("Camera Net", "Cameras: [global.cameranet.cameras.len] | Chunks: [global.cameranet.chunks.len]", "\ref[global.cameranet]")
|
||||
|
||||
///immediately update the active statpanel tab of the target client
|
||||
/datum/controller/subsystem/statpanels/proc/immediate_send_stat_data(client/target)
|
||||
if(!target.stat_panel.is_ready())
|
||||
return FALSE
|
||||
|
||||
if(target.stat_tab == "Examine")
|
||||
set_examine_tab(target)
|
||||
return TRUE
|
||||
|
||||
if(target.stat_tab == "Status")
|
||||
set_status_tab(target)
|
||||
return TRUE
|
||||
|
||||
var/mob/target_mob = target.mob
|
||||
|
||||
// Handle actions
|
||||
|
||||
var/update_actions = FALSE
|
||||
if(target.stat_tab in target.spell_tabs)
|
||||
update_actions = TRUE
|
||||
|
||||
//if(!length(target.spell_tabs) && locate(/datum/action/cooldown) in target_mob.actions)
|
||||
//update_actions = TRUE
|
||||
|
||||
if(update_actions)
|
||||
set_action_tabs(target, target_mob)
|
||||
return TRUE
|
||||
|
||||
// Handle turfs
|
||||
|
||||
if(target_mob?.listed_turf)
|
||||
if(!target_mob.TurfAdjacent(target_mob.listed_turf))
|
||||
target.stat_panel.send_message("removed_listedturf")
|
||||
target_mob.listed_turf = null
|
||||
|
||||
else if(target.stat_tab == target_mob?.listed_turf.name || !(target_mob?.listed_turf.name in target.panel_tabs))
|
||||
set_turf_examine_tab(target, target_mob)
|
||||
return TRUE
|
||||
|
||||
if(!target.holder)
|
||||
return FALSE
|
||||
|
||||
if(target.stat_tab == "MC")
|
||||
set_MC_tab(target)
|
||||
return TRUE
|
||||
|
||||
if(target.stat_tab == "Tickets")
|
||||
set_tickets_tab(target)
|
||||
return TRUE
|
||||
|
||||
if(!length(GLOB.sdql2_queries) && ("SDQL2" in target.panel_tabs))
|
||||
target.stat_panel.send_message("remove_sdql2")
|
||||
|
||||
else if(length(GLOB.sdql2_queries) && target.stat_tab == "SDQL2")
|
||||
set_SDQL2_tab(target)
|
||||
|
||||
/atom/proc/remove_from_cache()
|
||||
SIGNAL_HANDLER
|
||||
SSstatpanels.cached_images -= REF(src)
|
||||
|
||||
/// Stat panel window declaration
|
||||
/client/var/datum/tgui_window/stat_panel
|
||||
|
||||
/// Datum that holds and tracks info about a client's object window
|
||||
/// Really only exists because I want to be able to do logic with signals
|
||||
/// And need a safe place to do the registration
|
||||
/datum/object_window_info
|
||||
/// list of atoms to show to our client via the object tab, at least currently
|
||||
var/list/atoms_to_show = list()
|
||||
/// list of atom -> image string for objects we have had in the right click tab
|
||||
/// this is our caching
|
||||
var/list/atoms_to_images = list()
|
||||
/// list of atoms to turn into images for the object tab
|
||||
var/list/atoms_to_imagify = list()
|
||||
/// Our owner client
|
||||
var/client/parent
|
||||
/// Are we currently tracking a turf?
|
||||
var/actively_tracking = FALSE
|
||||
///For reusing this logic for examines
|
||||
var/atom/examine_target
|
||||
var/flags = 0
|
||||
|
||||
/datum/object_window_info/New(client/parent)
|
||||
. = ..()
|
||||
src.parent = parent
|
||||
|
||||
/datum/object_window_info/Destroy(force, ...)
|
||||
atoms_to_show = null
|
||||
atoms_to_images = null
|
||||
atoms_to_imagify = null
|
||||
parent.obj_window = null
|
||||
parent = null
|
||||
STOP_PROCESSING(SSobj_tab_items, src)
|
||||
return ..()
|
||||
|
||||
/// Takes a client, attempts to generate object images for it
|
||||
/// We will update the client with any improvements we make when we're done
|
||||
/datum/object_window_info/process(seconds_per_tick)
|
||||
// Cache the datum access for sonic speed
|
||||
var/list/to_make = atoms_to_imagify
|
||||
var/list/newly_seen = atoms_to_images
|
||||
var/index = 0
|
||||
for(index in 1 to length(to_make))
|
||||
var/atom/thing = to_make[index]
|
||||
|
||||
if(!thing) // A null thing snuck in somehow
|
||||
continue
|
||||
|
||||
var/generated_string
|
||||
if(ismob(thing) || length(thing.overlays) > 0)
|
||||
var/force_south = FALSE
|
||||
if(isliving(thing))
|
||||
force_south = TRUE
|
||||
generated_string = costly_icon2html(thing, parent, sourceonly=TRUE, force_south = force_south)
|
||||
else
|
||||
generated_string = icon2html(thing, parent, sourceonly=TRUE)
|
||||
|
||||
newly_seen[thing] = generated_string
|
||||
if(TICK_CHECK)
|
||||
to_make.Cut(1, index + 1)
|
||||
index = 0
|
||||
break
|
||||
// If we've not cut yet, do it now
|
||||
if(index)
|
||||
to_make.Cut(1, index + 1)
|
||||
SSstatpanels.refresh_client_obj_view(parent)
|
||||
if(!length(to_make))
|
||||
return PROCESS_KILL
|
||||
|
||||
/datum/object_window_info/proc/start_turf_tracking()
|
||||
if(actively_tracking)
|
||||
stop_turf_tracking()
|
||||
var/static/list/connections = list(
|
||||
COMSIG_MOVABLE_MOVED = PROC_REF(on_mob_move),
|
||||
COMSIG_MOB_LOGOUT = PROC_REF(on_mob_logout),
|
||||
)
|
||||
AddComponent(/datum/component/connect_mob_behalf, parent, connections)
|
||||
RegisterSignal(parent.mob.listed_turf, COMSIG_ATOM_ENTERED, PROC_REF(turflist_changed))
|
||||
RegisterSignal(parent.mob.listed_turf, COMSIG_ATOM_EXITED, PROC_REF(turflist_changed))
|
||||
actively_tracking = TRUE
|
||||
|
||||
/datum/object_window_info/proc/stop_turf_tracking()
|
||||
qdel(GetComponent(/datum/component/connect_mob_behalf))
|
||||
UnregisterSignal(parent.mob.listed_turf, COMSIG_ATOM_ENTERED)
|
||||
UnregisterSignal(parent.mob.listed_turf, COMSIG_ATOM_EXITED)
|
||||
actively_tracking = FALSE
|
||||
|
||||
/datum/object_window_info/proc/on_mob_move(mob/source)
|
||||
SIGNAL_HANDLER
|
||||
var/turf/listed = source.listed_turf
|
||||
if(!listed || !source.TurfAdjacent(listed))
|
||||
source.set_listed_turf(null)
|
||||
|
||||
/datum/object_window_info/proc/on_mob_logout(mob/source)
|
||||
SIGNAL_HANDLER
|
||||
on_mob_move(parent.mob)
|
||||
|
||||
/datum/object_window_info/proc/turflist_changed(mob/source)
|
||||
if(!parent)//statbrowser hasnt fired yet and we still have a pending action
|
||||
return
|
||||
SIGNAL_HANDLER
|
||||
if(!(flags & TURFLIST_UPDATED)) //Limit updates to 1 per tick
|
||||
SSstatpanels.immediate_send_stat_data(parent)
|
||||
flags |= TURFLIST_UPDATED
|
||||
else if(!(flags & TURFLIST_UPDATE_QUEUED))
|
||||
flags |= TURFLIST_UPDATE_QUEUED
|
||||
|
||||
/// Clears any cached object window stuff
|
||||
/// We use hard refs cause we'd need a signal for this anyway. Cleaner this way
|
||||
/datum/object_window_info/proc/viewing_atom_deleted(atom/deleted)
|
||||
SIGNAL_HANDLER
|
||||
atoms_to_show -= deleted
|
||||
atoms_to_imagify -= deleted
|
||||
atoms_to_images -= deleted
|
||||
|
||||
/mob/proc/set_listed_turf(turf/new_turf)
|
||||
if(!client)
|
||||
listed_turf = new_turf
|
||||
return
|
||||
if(!client.obj_window)
|
||||
client.obj_window = new(client)
|
||||
if(!new_turf)
|
||||
client.obj_window.stop_turf_tracking() //Needs to go before listed_turf is set to null so signals can be removed
|
||||
listed_turf = new_turf
|
||||
|
||||
if(listed_turf)
|
||||
client.stat_panel.send_message("create_listedturf", listed_turf.name)
|
||||
client.obj_window.start_turf_tracking()
|
||||
else
|
||||
client.stat_panel.send_message("remove_listedturf")
|
||||
@@ -39,8 +39,9 @@ SUBSYSTEM_DEF(supply)
|
||||
/datum/controller/subsystem/supply/fire()
|
||||
points += points_per_process
|
||||
|
||||
/datum/controller/subsystem/supply/stat_entry()
|
||||
..("Points: [points]")
|
||||
/datum/controller/subsystem/supply/stat_entry(msg)
|
||||
msg = "Points: [points]"
|
||||
return ..()
|
||||
|
||||
//To stop things being sent to CentCom which should not be sent to centcomm. Recursively checks for these types.
|
||||
/datum/controller/subsystem/supply/proc/forbidden_atoms_check(atom/A)
|
||||
|
||||
@@ -35,8 +35,9 @@ SUBSYSTEM_DEF(tgui)
|
||||
/datum/controller/subsystem/tgui/Shutdown()
|
||||
close_all_uis()
|
||||
|
||||
/datum/controller/subsystem/tgui/stat_entry()
|
||||
..("P:[all_uis.len]")
|
||||
/datum/controller/subsystem/tgui/stat_entry(msg)
|
||||
msg = "P:[all_uis.len]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/tgui/fire(resumed = FALSE)
|
||||
if(!resumed)
|
||||
|
||||
@@ -9,8 +9,9 @@ SUBSYSTEM_DEF(throwing)
|
||||
var/list/currentrun
|
||||
var/list/processing = list()
|
||||
|
||||
/datum/controller/subsystem/throwing/stat_entry()
|
||||
..("P:[processing.len]")
|
||||
/datum/controller/subsystem/throwing/stat_entry(msg)
|
||||
msg = "P:[processing.len]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/throwing/fire(resumed = 0)
|
||||
if (!resumed)
|
||||
|
||||
@@ -41,6 +41,10 @@ SUBSYSTEM_DEF(ticker)
|
||||
//Now we have a general cinematic centrally held within the gameticker....far more efficient!
|
||||
var/obj/screen/cinematic = null
|
||||
|
||||
var/round_start_time = 0
|
||||
|
||||
|
||||
|
||||
// This global variable exists for legacy support so we don't have to rename every 'ticker' to 'SSticker' yet.
|
||||
var/global/datum/controller/subsystem/ticker/ticker
|
||||
/datum/controller/subsystem/ticker/PreInit()
|
||||
@@ -101,6 +105,7 @@ var/global/datum/controller/subsystem/ticker/ticker
|
||||
|
||||
// Called during GAME_STATE_SETTING_UP (RUNLEVEL_SETUP)
|
||||
/datum/controller/subsystem/ticker/proc/setup_tick(resumed = FALSE)
|
||||
round_start_time = world.time // otherwise round_start_time would be 0 for the signals
|
||||
if(!setup_choose_gamemode())
|
||||
// It failed, go back to lobby state and re-send the welcome message
|
||||
pregame_timeleft = config.pregame_time
|
||||
@@ -418,6 +423,7 @@ var/global/datum/controller/subsystem/ticker/ticker
|
||||
if(new_char.client)
|
||||
var/obj/screen/splash/S = new(new_char.client, TRUE)
|
||||
S.Fade(TRUE)
|
||||
new_char.client.init_verbs()
|
||||
|
||||
// If they're a carbon, they can get manifested
|
||||
if(J?.mob_type & JOB_CARBON)
|
||||
@@ -542,28 +548,29 @@ var/global/datum/controller/subsystem/ticker/ticker
|
||||
|
||||
return 1
|
||||
|
||||
/datum/controller/subsystem/ticker/stat_entry()
|
||||
/datum/controller/subsystem/ticker/stat_entry(msg)
|
||||
switch(current_state)
|
||||
if(GAME_STATE_INIT)
|
||||
..()
|
||||
if(GAME_STATE_PREGAME) // RUNLEVEL_LOBBY
|
||||
..("START [round_progressing ? "[round(pregame_timeleft)]s" : "(PAUSED)"]")
|
||||
msg = "START [round_progressing ? "[round(pregame_timeleft)]s" : "(PAUSED)"]"
|
||||
if(GAME_STATE_SETTING_UP) // RUNLEVEL_SETUP
|
||||
..("SETUP")
|
||||
msg = "SETUP"
|
||||
if(GAME_STATE_PLAYING) // RUNLEVEL_GAME
|
||||
..("GAME")
|
||||
msg = "GAME"
|
||||
if(GAME_STATE_FINISHED) // RUNLEVEL_POSTGAME
|
||||
switch(end_game_state)
|
||||
if(END_GAME_MODE_FINISHED)
|
||||
..("MODE OVER, WAITING")
|
||||
msg = "MODE OVER, WAITING"
|
||||
if(END_GAME_READY_TO_END)
|
||||
..("ENDGAME PROCESSING")
|
||||
msg = "ENDGAME PROCESSING"
|
||||
if(END_GAME_ENDING)
|
||||
..("END IN [round(restart_timeleft/10)]s")
|
||||
msg = "END IN [round(restart_timeleft/10)]s"
|
||||
if(END_GAME_DELAYED)
|
||||
..("END PAUSED")
|
||||
msg = "END PAUSED"
|
||||
else
|
||||
..("ENDGAME ERROR:[end_game_state]")
|
||||
msg = "ENDGAME ERROR:[end_game_state]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/ticker/Recover()
|
||||
flags |= SS_NO_INIT // Don't initialize again
|
||||
@@ -579,3 +586,5 @@ var/global/datum/controller/subsystem/ticker/ticker
|
||||
minds = SSticker.minds
|
||||
|
||||
random_players = SSticker.random_players
|
||||
|
||||
round_start_time = SSticker.round_start_time
|
||||
|
||||
@@ -34,7 +34,8 @@ SUBSYSTEM_DEF(timer)
|
||||
bucket_resolution = world.tick_lag
|
||||
|
||||
/datum/controller/subsystem/timer/stat_entry(msg)
|
||||
..("B:[bucket_count] P:[length(second_queue)] H:[length(hashes)] C:[length(clienttime_timers)] S:[length(timer_id_dict)]")
|
||||
msg = "B:[bucket_count] P:[length(second_queue)] H:[length(hashes)] C:[length(clienttime_timers)] S:[length(timer_id_dict)]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/timer/fire(resumed = FALSE)
|
||||
var/lit = last_invoke_tick
|
||||
|
||||
@@ -122,9 +122,8 @@ SUBSYSTEM_DEF(transcore)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/transcore/stat_entry()
|
||||
var/msg = list()
|
||||
msg += "$:{"
|
||||
/datum/controller/subsystem/transcore/stat_entry(msg)
|
||||
msg = "$:{"
|
||||
msg += "IM:[round(cost_implants,1)]|"
|
||||
msg += "BK:[round(cost_backups,1)]"
|
||||
msg += "} "
|
||||
@@ -137,7 +136,7 @@ SUBSYSTEM_DEF(transcore)
|
||||
msg += "DFB:[default_db.body_scans.len]|"
|
||||
msg += "DFI:[default_db.implants.len]"
|
||||
msg += "} "
|
||||
..(jointext(msg, null))
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/transcore/Recover()
|
||||
for(var/key in SStranscore.databases)
|
||||
|
||||
Reference in New Issue
Block a user