This commit ports the StonedMC from /tg/station, intended to replace the
Process Scheduler from goon. Currently, they exist simultaneously, as
it's very difficult to port our 22 processes to the SMC all at once.
Instead, we can make them work together until everything is converted
over at a later point, and then take the old PS out back and put a
couple of rounds into it's deformed skull.

Primary benefits of this new process controller include: Other people
that can actually maintain it, unlike the PS, pre-world-init
initialization for subsystems, ease of ports from /tg/station13, and
potential performance improvement (to be seen).
This commit is contained in:
tigercat2000
2018-03-02 21:12:49 -08:00
parent 1ef0c8e2c0
commit 47cd4cb127
29 changed files with 2181 additions and 78 deletions
+3 -15
View File
@@ -1,6 +1,6 @@
//simplified MC that is designed to fail when procs 'break'. When it fails it's just replaced with a new one.
//It ensures master_controller.process() is never doubled up by killing the MC (hence terminating any of its sleeping procs)
//WIP, needs lots of work still
// old deprecated rusted piece of shit MC
// All this does now is misc. world init stuff because too lazy to put it somewhere else
// It used to run all of the repeating processes controlling the game but now the SMC and Process Scheduler do that
var/global/datum/controller/game_controller/master_controller //Set in world.New()
@@ -10,16 +10,6 @@ var/global/last_tick_duration = 0
var/global/air_processing_killed = 0
var/global/pipe_processing_killed = 0
/datum/controller
var/processing = 0
var/iteration = 0
var/processing_interval = 0
// Dummy object to let us click it to debug while in the stat panel
var/obj/effect/statclick/debug/statclick
/datum/controller/proc/recover() // If we are replacing an existing controller (due to a crash) we attempt to preserve as much as we can.
/datum/controller/game_controller
var/list/shuttle_list // For debugging and VV
@@ -46,8 +36,6 @@ var/global/pipe_processing_killed = 0
return QDEL_HINT_HARDDEL_NOW
/datum/controller/game_controller/proc/setup()
world.tick_lag = config.Ticklag
preloadTemplates()
if(!config.disable_away_missions)
createRandomZlevel()