mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Tweaks Statpanel and System Initialization
This commit is contained in:
@@ -149,7 +149,11 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
|
||||
// Sort subsystems by display setting for easy access.
|
||||
sortTim(subsystems, /proc/cmp_subsystem_display)
|
||||
// Set world options.
|
||||
#ifdef UNIT_TEST
|
||||
world.sleep_offline = 0
|
||||
#else
|
||||
world.sleep_offline = 1
|
||||
#endif
|
||||
world.fps = config.fps
|
||||
var/initialized_tod = REALTIMEOFDAY
|
||||
sleep(1)
|
||||
|
||||
@@ -4,7 +4,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
/datum/feedback_variable //Prevents people messing with feedback gathering,
|
||||
)
|
||||
|
||||
var/list/VVlocked = list("vars", "client", "virus", "viruses", "cuffed", "last_eaten", "unlock_content", "bound_x", "bound_y", "step_x", "step_y", "force_ending")
|
||||
var/list/VVlocked = list("vars", "client", "virus", "viruses", "cuffed", "last_eaten", "unlock_content", "bound_x", "bound_y", "step_x", "step_y", "force_ending", "queued_priority")
|
||||
var/list/VVicon_edit_lock = list("icon", "icon_state", "overlays", "underlays")
|
||||
var/list/VVckey_edit = list("key", "ckey")
|
||||
|
||||
|
||||
@@ -284,6 +284,18 @@
|
||||
if(inactivity > duration) return inactivity
|
||||
return 0
|
||||
|
||||
// Byond seemingly calls stat, each tick.
|
||||
// Calling things each tick can get expensive real quick.
|
||||
// So we slow this down a little.
|
||||
// See: http://www.byond.com/docs/ref/info.html#/client/proc/Stat
|
||||
/client/Stat()
|
||||
. = ..()
|
||||
if (holder)
|
||||
sleep(1)
|
||||
else
|
||||
sleep(5)
|
||||
stoplag()
|
||||
|
||||
/client/proc/last_activity_seconds()
|
||||
return inactivity / 10
|
||||
|
||||
|
||||
@@ -49,9 +49,10 @@
|
||||
description_holders["icon"] = "\icon[A]"
|
||||
description_holders["desc"] = A.desc
|
||||
|
||||
/client/Stat()
|
||||
/mob/Stat()
|
||||
. = ..()
|
||||
if(usr && statpanel("Examine"))
|
||||
if(client && statpanel("Examine"))
|
||||
var/description_holders = client.description_holders
|
||||
stat(null,"[description_holders["icon"]] <font size='5'>[description_holders["name"]]</font>") //The name, written in big letters.
|
||||
stat(null,"[description_holders["desc"]]") //the default examine text.
|
||||
if(description_holders["info"])
|
||||
|
||||
@@ -672,6 +672,23 @@
|
||||
if(processScheduler)
|
||||
processScheduler.statProcesses()
|
||||
|
||||
if(statpanel("MC"))
|
||||
stat("CPU:","[world.cpu]")
|
||||
stat("Instances:","[world.contents.len]")
|
||||
stat(null)
|
||||
if(Master)
|
||||
Master.stat_entry()
|
||||
else
|
||||
stat("Master Controller:", "ERROR")
|
||||
if(Failsafe)
|
||||
Failsafe.stat_entry()
|
||||
else
|
||||
stat("Failsafe Controller:", "ERROR")
|
||||
if(Master)
|
||||
stat(null)
|
||||
for(var/datum/controller/subsystem/SS in Master.subsystems)
|
||||
SS.stat_entry()
|
||||
|
||||
if(listed_turf && client)
|
||||
if(!TurfAdjacent(listed_turf))
|
||||
listed_turf = null
|
||||
|
||||
@@ -70,8 +70,6 @@ var/global/datum/global_init/init = new ()
|
||||
#if UNIT_TEST
|
||||
log_unit_test("Unit Tests Enabled. This will destroy the world when testing is complete.")
|
||||
log_unit_test("If you did not intend to enable this please check code/__defines/unit_testing.dm")
|
||||
#else
|
||||
sleep_offline = 1
|
||||
#endif
|
||||
|
||||
// Set up roundstart seed list.
|
||||
@@ -116,6 +114,7 @@ var/global/datum/global_init/init = new ()
|
||||
|
||||
processScheduler = new
|
||||
master_controller = new /datum/controller/game_controller()
|
||||
Master.Initialize(10, FALSE)
|
||||
spawn(1)
|
||||
processScheduler.deferSetupFor(/datum/controller/process/ticker)
|
||||
processScheduler.setup()
|
||||
|
||||
Reference in New Issue
Block a user