Port's TG's Maploader

This commit is contained in:
Neerti
2017-09-08 08:14:43 -04:00
parent 9ce3c85127
commit 1bc28c07c0
32 changed files with 1472 additions and 444 deletions

View File

@@ -47,7 +47,7 @@ var/datum/controller/master/Master = new()
var/static/restart_clear = 0
var/static/restart_timeout = 0
var/static/restart_count = 0
//current tick limit, assigned before running a subsystem.
//used by CHECK_TICK as well so that the procs subsystems call can obey that SS's tick limits
var/static/current_ticklimit = TICK_LIMIT_RUNNING
@@ -541,15 +541,25 @@ var/datum/controller/master/Master = new()
stat("Master Controller:", statclick.update("(TickRate:[Master.processing]) (Iteration:[Master.iteration])"))
/datum/controller/master/StartLoadingMap()
if(map_loading)
admin_notice("<span class='danger'>Another map is attempting to be loaded before first map released lock. Delaying.</span>", R_DEBUG)
else
admin_notice("<span class='danger'>Map is now being built. Locking.</span>", R_DEBUG)
//disallow more than one map to load at once, multithreading it will just cause race conditions
while(map_loading)
stoplag()
for(var/S in subsystems)
var/datum/controller/subsystem/SS = S
SS.StartLoadingMap()
// ZAS might displace objects as the map loads if an air tick is processed mid-load.
air_processing_killed = TRUE
map_loading = TRUE
/datum/controller/master/StopLoadingMap(bounds = null)
admin_notice("<span class='danger'>Map is finished. Unlocking.</span>", R_DEBUG)
air_processing_killed = FALSE
map_loading = FALSE
for(var/S in subsystems)
var/datum/controller/subsystem/SS = S