Revert the map loader optimization

Reverts #24764
This commit is contained in:
Cyberboss
2017-03-10 00:12:00 -03:00
committed by Leo
parent 01cb0885e2
commit a0df4444eb
20 changed files with 52 additions and 328 deletions
+10 -3
View File
@@ -106,14 +106,18 @@ var/datum/controller/subsystem/mapping/SSmapping
if(last)
QDEL_NULL(loader)
/datum/controller/subsystem/mapping/proc/CreateSpace()
++world.maxz
CHECK_TICK
for(var/T in block(locate(1, 1, world.maxz), locate(world.maxx, world.maxy, world.maxz)))
CHECK_TICK
new /turf/open/space(T)
#define INIT_ANNOUNCE(X) world << "<span class='boldannounce'>[X]</span>"; log_world(X)
/datum/controller/subsystem/mapping/proc/loadWorld()
//if any of these fail, something has gone horribly, HORRIBLY, wrong
var/list/FailedZs = list()
if(world.maxz != ZLEVEL_SPACEMAX)
WARNING("world.maxz does not match ZLEVEL_SPACEMAX!")
INIT_ANNOUNCE("Loading [config.map_name]...")
TryLoadZ(config.GetFullMapPath(), FailedZs, ZLEVEL_STATION)
INIT_ANNOUNCE("Loaded station!")
@@ -121,6 +125,9 @@ var/datum/controller/subsystem/mapping/SSmapping
if(config.minetype != "lavaland")
INIT_ANNOUNCE("WARNING: A map without lavaland set as it's minetype was loaded! This is being ignored! Update the maploader code!")
for(var/I in (ZLEVEL_MINING + 1) to ZLEVEL_SPACEMAX)
CreateSpace()
if(LAZYLEN(FailedZs)) //but seriously, unless the server's filesystem is messed up this will never happen
var/msg = "RED ALERT! The following map files failed to load: [FailedZs[1]]"
if(FailedZs.len > 1)