Revises the_station_areas list

This commit is contained in:
Leo
2017-11-24 18:12:44 -02:00
committed by CitadelStationBot
parent 9f7b3a11c3
commit 521277292d
2 changed files with 18 additions and 1 deletions
+14
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()