Kill airlocks' process(), SSpower, and misc. performance tweaks (#2175)

changes:

Airlocks no longer tick (exceptions: firedoors, uranium airlocks)
Airlock commands run before round-start are queued to run at round-start.
Airlock commands that failed to run are scheduled to try again in 2 seconds with timers.
Callbacks can now be registered with SSticker to run at round-start in a non-blocking way.
Added a new subsystem (SSpower) for handling power-related functions. Currently doesn't do a whole lot, but this will likely eventually change.
RCON functionality has been moved from SSmachinery to SSpower.
The global cable list has been moved into SSpower.
Powernet sensors no longer process purely to keep themselves in the global machines list, instead they are added to a list in SSpower.
Power terminals no longer pointlessly tick.
Removed some variables from SSticker that weren't used by anything.
Holographic overlays such as those used by consoles are now cached.
Xenoarcheology setup is now tick-checked.
ZAS now uses post-fire timing.
The req_access and req_one_access lists are no longer initialized by default on all /obj types.
Openturfs will only emit starlight if they are bordering a non-openturf dynamically lit turf.
Powernets are now stored in SSpower instead of being a global.
The global mouse list is now stored in SSmob instead of being a global.
Fixed some weirdness in APCs' Destroy() caused by a merge.
SSwireless now pre-bakes to reduce round-start processing.
SSwireless no longer uses processing queues.
This commit is contained in:
Lohikar
2017-05-11 14:19:51 -05:00
committed by skull132
parent b52e374df3
commit 6ef9191275
37 changed files with 318 additions and 234 deletions

View File

@@ -25,6 +25,11 @@
/obj/machinery/power/sensor/Initialize()
. = ..()
auto_set_name()
SSpower.all_sensors += src
/obj/machinery/power/sensor/Destroy()
. = ..()
SSpower.all_sensors -= src
// Proc: auto_set_name()
// Parameters: None
@@ -42,12 +47,6 @@
return 1
return 0
// Proc: process()
// Parameters: None
// Description: This has to be here because we need sensors to remain in Machines list.
/obj/machinery/power/sensor/process()
return 1
// Proc: reading_to_text()
// Parameters: 1 (amount - Power in Watts to be converted to W, kW or MW)
// Description: Helper proc that converts reading in Watts to kW or MW (returns string version of amount parameter)