mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Ranch
This commit is contained in:
@@ -78,7 +78,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
var/list/deffo_load = using_map.lateload_z_levels
|
||||
var/list/maybe_load = using_map.lateload_gateway
|
||||
var/list/also_load = using_map.lateload_overmap
|
||||
|
||||
var/list/redgate_load = using_map.lateload_redgate
|
||||
|
||||
for(var/list/maplist in deffo_load)
|
||||
if(!islist(maplist))
|
||||
@@ -134,6 +134,27 @@ SUBSYSTEM_DEF(mapping)
|
||||
else
|
||||
MT.load_new_z(centered = FALSE)
|
||||
|
||||
if(LAZYLEN(redgate_load))
|
||||
var/picklist = pick(redgate_load)
|
||||
|
||||
if(!picklist) //No lateload maps at all
|
||||
return
|
||||
|
||||
if(!islist(picklist)) //So you can have a 'chain' of z-levels that make up one away mission
|
||||
error("Randompick Z level [picklist] is not a list! Must be in a list!")
|
||||
return
|
||||
|
||||
for(var/map in picklist)
|
||||
if(islist(map))
|
||||
// TRIPLE NEST. In this situation we pick one at random from the choices in the list.
|
||||
//This allows a sort of a1,a2,a3,b1,b2,b3,c1,c2,c3 setup where it picks one 'a', one 'b', one 'c'
|
||||
map = pick(map)
|
||||
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)
|
||||
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/preloadShelterTemplates()
|
||||
for(var/datum/map_template/shelter/shelter_type as anything in subtypesof(/datum/map_template/shelter))
|
||||
|
||||
Reference in New Issue
Block a user