Merge pull request #4113 from Citadel-Station-13/upstream-merge-32998

[MIRROR] Revises the_station_areas list
This commit is contained in:
deathride58
2017-11-24 23:47:34 +00:00
committed by GitHub
2 changed files with 14 additions and 33 deletions

View File

@@ -62,6 +62,7 @@ SUBSYSTEM_DEF(mapping)
repopulate_sorted_areas()
// Set up Z-level transistions.
setup_map_transitions()
generate_station_area_list()
..()
/* Nuke threats, for making the blue tiles on the station go RED
@@ -139,6 +140,19 @@ SUBSYSTEM_DEF(mapping)
INIT_ANNOUNCE(msg)
#undef INIT_ANNOUNCE
GLOBAL_LIST_EMPTY(the_station_areas)
/datum/controller/subsystem/mapping/proc/generate_station_area_list()
var/list/station_areas_blacklist = typecacheof(list(/area/space, /area/mine, /area/ruin))
for(var/area/A in world)
var/turf/picked = safepick(get_area_turfs(A.type))
if(picked && (picked.z in GLOB.station_z_levels))
if(!(A.type in GLOB.the_station_areas) && !is_type_in_typecache(A, station_areas_blacklist))
GLOB.the_station_areas.Add(A.type)
if(!GLOB.the_station_areas.len)
log_world("ERROR: Station areas list failed to generate!")
/datum/controller/subsystem/mapping/proc/maprotate()
var/players = GLOB.clients.len
var/list/mapvotes = list()