Merge pull request #2848 from VOREStation/aro-exploration

Exploration Update
This commit is contained in:
Aronai Sieyes
2018-01-27 15:32:42 -05:00
committed by GitHub
57 changed files with 1862 additions and 1707 deletions

View File

@@ -19,6 +19,8 @@ SUBSYSTEM_DEF(mapping)
// createRandomZlevel()
// Mining generation probably should be here too
// TODO - Other stuff related to maps and areas could be moved here too. Look at /tg
if(using_map)
loadLateMaps()
..()
/datum/controller/subsystem/mapping/proc/loadEngine()
@@ -49,10 +51,38 @@ SUBSYSTEM_DEF(mapping)
// Annihilate movable atoms
engine_loader.annihilate_bounds()
CHECK_TICK
//CHECK_TICK //Don't let anything else happen for now
// Actually load it
chosen_type.load(T)
/datum/controller/subsystem/mapping/proc/loadLateMaps()
var/list/deffo_load = using_map.lateload_z_levels
var/list/maybe_load = using_map.lateload_single_pick
for(var/mapname in deffo_load)
var/datum/map_template/MT = map_templates[mapname]
if(!istype(MT))
error("Lateload Z level \"[mapname]\" is not a valid map!")
continue
MT.load_new_z(centered = FALSE, dont_init = TRUE)
//CHECK_TICK //Can't deal with this until SSAtoms
if(LAZYLEN(maybe_load))
var/picked = pick(maybe_load)
var/list/picklist
if(islist(picked)) //So you can have a 'chain' of z-levels that make up one away mission
picklist = picked
else
picklist = list(picked)
for(var/map in picklist)
var/datum/map_template/MT = map_templates[map]
if(!istype(MT))
error("Randompick Z level \"[map]\" is not a valid map!")
else
MT.load_new_z(centered = FALSE, dont_init = TRUE)
/datum/controller/subsystem/mapping/stat_entry(msg)
if (!Debug2)
return // Only show up in stat panel if debugging is enabled.