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()

View File

@@ -1486,36 +1486,3 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/tcommsat/lounge
name = "Telecommunications Satellite Lounge"
icon_state = "tcomsatlounge"
/////////////////////////////////////////////////////////////////////
/*
Lists of areas to be used with is_type_in_list.
Used in gamemodes code at the moment. --rastaf0
*/
//SPACE STATION 13
GLOBAL_LIST_INIT(the_station_areas, list (
/area/bridge,
/area/chapel,
/area/construction,
/area/crew_quarters,
/area/engine,
/area/hallway,
/area/holodeck,
/area/hydroponics,
/area/janitor,
/area/lawoffice,
/area/library,
/area/maintenance,
/area/medical,
/area/quartermaster,
/area/science,
/area/security,
/area/solar,
/area/storage,
/area/teleporter,
/area/ai_monitored/storage/eva, //do not try to simplify to "/area/ai_monitored" --rastaf0
/area/ai_monitored/turret_protected/ai_upload, //do not try to simplify to "/area/ai_monitored/turret_protected" --rastaf0
/area/ai_monitored/turret_protected/ai_upload_foyer,
/area/ai_monitored/turret_protected/ai,
))