diff --git a/code/controllers/subsystems/mapping_vr.dm b/code/controllers/subsystems/mapping_vr.dm index 0a94cc4634..9eac5cd60e 100644 --- a/code/controllers/subsystems/mapping_vr.dm +++ b/code/controllers/subsystems/mapping_vr.dm @@ -7,8 +7,9 @@ SUBSYSTEM_DEF(mapping) init_order = INIT_ORDER_MAPPING flags = SS_NO_FIRE + var/list/map_templates = list() + var/dmm_suite/maploader = null var/obj/effect/landmark/engine_loader/engine_loader - var/list/shelter_templates = list() /datum/controller/subsystem/mapping/Recover() @@ -16,6 +17,16 @@ SUBSYSTEM_DEF(mapping) shelter_templates = SSmapping.shelter_templates /datum/controller/subsystem/mapping/Initialize(timeofday) + if(subsystem_initialized) + return + maploader = new() + load_map_templates() + + if(config.generate_map) + // Map-gen is still very specific to the map, however putting it here should ensure it loads in the correct order. + if(using_map.perform_map_generation()) + using_map.refresh_mining_turfs() + loadEngine() preloadShelterTemplates() // Mining generation probably should be here too @@ -24,6 +35,15 @@ SUBSYSTEM_DEF(mapping) loadLateMaps() ..() +/datum/controller/subsystem/mapping/proc/load_map_templates() + for(var/T in subtypesof(/datum/map_template)) + var/datum/map_template/template = T + if(!(initial(template.mappath))) // If it's missing the actual path its probably a base type or being used for inheritence. + continue + template = new T() + map_templates[template.name] = template + return TRUE + /datum/controller/subsystem/mapping/proc/loadEngine() if(!engine_loader) return // Seems this map doesn't need an engine loaded. diff --git a/code/world.dm b/code/world.dm index 604e598e7e..33f60116bd 100644 --- a/code/world.dm +++ b/code/world.dm @@ -420,10 +420,6 @@ var/world_topic_spam_protect_time = world.timeofday /*spawn(0) world << sound(pick('sound/AI/newroundsexy.ogg','sound/misc/apcdestroyed.ogg','sound/misc/bangindonk.ogg')) // random end sounds!! - LastyBatsy */ -<<<<<<< HEAD - - log_world("World rebooted at [time_stamp()]") - ..() if (reason || fast_track) //special reboot, do none of the normal stuff if (usr) diff --git a/vorestation.dme b/vorestation.dme index 7f04cda0b9..3806fae488 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -223,12 +223,8 @@ #include "code\controllers\subsystems\inactivity.dm" #include "code\controllers\subsystems\lighting.dm" #include "code\controllers\subsystems\machines.dm" -<<<<<<< HEAD:vorestation.dme #include "code\controllers\subsystems\mapping_vr.dm" #include "code\controllers\subsystems\mobs.dm" -======= -#include "code\controllers\subsystems\mapping.dm" ->>>>>>> ec4e2be... Merge pull request #5778 from Neerti/emergency_maploader_fix:polaris.dme #include "code\controllers\subsystems\orbits.dm" #include "code\controllers\subsystems\overlays.dm" #include "code\controllers\subsystems\persist_vr.dm"