mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Goon process scheduler
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
var/global/datum/controller/game_controller/master_controller //Set in world.New()
|
||||
|
||||
var/global/controller_iteration = 0
|
||||
var/global/last_tick_timeofday = world.timeofday
|
||||
var/global/last_tick_duration = 0
|
||||
|
||||
var/global/air_processing_killed = 0
|
||||
@@ -54,8 +53,8 @@ datum/controller/game_controller/New()
|
||||
|
||||
if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase()
|
||||
if(!syndicate_code_response) syndicate_code_response = generate_code_phrase()
|
||||
if(!emergency_shuttle) emergency_shuttle = new /datum/emergency_shuttle_controller()
|
||||
if(!shuttle_controller) shuttle_controller = new /datum/shuttle_controller()
|
||||
//if(!emergency_shuttle) emergency_shuttle = new /datum/emergency_shuttle_controller() MOVED TO SCHEDULER
|
||||
//if(!shuttle_controller) shuttle_controller = new /datum/shuttle_controller()
|
||||
|
||||
datum/controller/game_controller/proc/setup()
|
||||
world.tick_lag = config.Ticklag
|
||||
@@ -63,16 +62,19 @@ datum/controller/game_controller/proc/setup()
|
||||
spawn(20)
|
||||
createRandomZlevel()
|
||||
|
||||
/* MOVED TO SCHEDULER
|
||||
if(!air_master)
|
||||
air_master = new /datum/controller/air_system()
|
||||
air_master.Setup()
|
||||
|
||||
if(!ticker)
|
||||
ticker = new /datum/controller/gameticker()
|
||||
*/
|
||||
|
||||
if(!garbage)
|
||||
garbage = new /datum/controller/garbage_collector()
|
||||
|
||||
|
||||
color_windows_init()
|
||||
setup_objects()
|
||||
setupgenetics()
|
||||
@@ -82,15 +84,17 @@ datum/controller/game_controller/proc/setup()
|
||||
|
||||
for(var/i=0, i<max_secret_rooms, i++)
|
||||
make_mining_asteroid_secret()
|
||||
|
||||
|
||||
populate_spawn_points()
|
||||
|
||||
/* MOVED TO SCHEDULER
|
||||
|
||||
spawn(0)
|
||||
if(ticker)
|
||||
ticker.pregame()
|
||||
|
||||
lighting_controller.Initialize()
|
||||
|
||||
*/
|
||||
|
||||
datum/controller/game_controller/proc/setup_objects()
|
||||
world << "\red \b Initializing objects"
|
||||
@@ -132,9 +136,6 @@ datum/controller/game_controller/proc/process()
|
||||
while(1) //far more efficient than recursively calling ourself
|
||||
if(!Failsafe) new /datum/controller/failsafe()
|
||||
|
||||
var/currenttime = world.timeofday
|
||||
last_tick_duration = (currenttime - last_tick_timeofday) / 10
|
||||
last_tick_timeofday = currenttime
|
||||
|
||||
if(processing)
|
||||
var/timer
|
||||
|
||||
Reference in New Issue
Block a user