diff --git a/code/game/area/ss13_areas.dm b/code/game/area/ss13_areas.dm index 61857e08519..58b664b2ce2 100644 --- a/code/game/area/ss13_areas.dm +++ b/code/game/area/ss13_areas.dm @@ -1854,10 +1854,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station name = "Secure Storage" icon_state = "storage" -/area/ai_monitored/storage/emergency - name = "Emergency Storage" - icon_state = "storage" - /area/turret_protected/ ambientsounds = list('sound/ambience/ambimalf.ogg', 'sound/ambience/ambitech.ogg', 'sound/ambience/ambitech2.ogg', 'sound/ambience/ambiatmos.ogg', 'sound/ambience/ambiatmos2.ogg') @@ -2140,7 +2136,6 @@ GLOBAL_LIST_INIT(the_station_areas, list( /area/construction, /area/ai_monitored/storage/eva, //do not try to simplify to "/area/ai_monitored" --rastaf0 /area/ai_monitored/storage/secure, - /area/ai_monitored/storage/emergency, /area/turret_protected/ai_upload, //do not try to simplify to "/area/turret_protected" --rastaf0 /area/turret_protected/ai_upload_foyer, /area/turret_protected/ai, diff --git a/code/modules/events/anomaly.dm b/code/modules/events/anomaly.dm index 12eaef33823..3e9230742fa 100644 --- a/code/modules/events/anomaly.dm +++ b/code/modules/events/anomaly.dm @@ -3,35 +3,6 @@ var/obj/effect/anomaly/anomaly_path = /obj/effect/anomaly/flux announceWhen = 1 -/datum/event/anomaly/proc/findEventArea() - var/static/list/allowed_areas - if(!allowed_areas) - //Places that shouldn't explode - var/list/safe_area_types = typecacheof(list( - /area/turret_protected/ai, - /area/turret_protected/ai_upload, - /area/ai_monitored/storage/emergency, - /area/engine, - /area/solar, - /area/holodeck, - /area/shuttle, - /area/maintenance, - /area/toxins/test_area) - ) - - //Subtypes from the above that actually should explode. - var/list/unsafe_area_subtypes = typecacheof(list( - /area/engine/break_room, - /area/engine/equipmentstorage, - /area/engine/chiefs_office, - /area/engine/controlroom - )) - - allowed_areas = typecacheof(GLOB.the_station_areas) - safe_area_types + unsafe_area_subtypes - var/list/possible_areas = typecache_filter_list(SSmapping.existing_station_areas, allowed_areas) - if(length(possible_areas)) - return pick(possible_areas) - /datum/event/anomaly/setup() impact_area = findEventArea() if(!impact_area) diff --git a/code/modules/events/event_procs.dm b/code/modules/events/event_procs.dm index 2fa4bab93bf..af24915ddb3 100644 --- a/code/modules/events/event_procs.dm +++ b/code/modules/events/event_procs.dm @@ -19,47 +19,29 @@ return /proc/findEventArea() //Here's a nice proc to use to find an area for your event to land in! - var/area/candidate = null - - var/list/safe_areas = list( + var/list/safe_areas = typecacheof(list( /area/turret_protected/ai, /area/turret_protected/ai_upload, /area/engine, /area/solar, /area/holodeck, - /area/shuttle/arrival, - /area/shuttle/escape, - /area/shuttle/escape_pod1/station, - /area/shuttle/escape_pod2/station, - /area/shuttle/escape_pod3/station, - /area/shuttle/escape_pod5/station, - /area/shuttle/specops/station, - /area/shuttle/prison/station, - /area/shuttle/administration/station - ) + /area/shuttle, + /area/maintenance, + /area/toxins/test_area)) //These are needed because /area/engine has to be removed from the list, but we still want these areas to get fucked up. var/list/danger_areas = list( /area/engine/break_room, - /area/engine/chiefs_office) + /area/engine/equipmentstorage, + /area/engine/chiefs_office, + /area/engine/controlroom) - var/list/event_areas = list() + var/list/allowed_areas = list() - for(var/areapath in GLOB.the_station_areas) - event_areas += typesof(areapath) - for(var/areapath in safe_areas) - event_areas -= typesof(areapath) - for(var/areapath in danger_areas) - event_areas += typesof(areapath) + allowed_areas = typecacheof(GLOB.the_station_areas) - safe_areas + danger_areas + var/list/possible_areas = typecache_filter_list(SSmapping.existing_station_areas, allowed_areas) - while(event_areas.len > 0) - var/list/event_turfs = null - candidate = locate(pick_n_take(event_areas)) - event_turfs = get_area_turfs(candidate) - if(event_turfs.len > 0) - break - - return candidate + return pick(possible_areas) // Returns how many characters are currently active(not logged out, not AFK for more than 10 minutes) // with a specific role.