From 98a0602b1ac5845702fe7605272c4087e771d0ac Mon Sep 17 00:00:00 2001 From: oranges Date: Sat, 9 Dec 2017 20:36:37 +1300 Subject: [PATCH 1/2] Add a proc to check if a weather type is affecting an area (#33373) --- code/controllers/subsystem/weather.dm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/controllers/subsystem/weather.dm b/code/controllers/subsystem/weather.dm index 2909d1c70a..dafd9d6fd0 100644 --- a/code/controllers/subsystem/weather.dm +++ b/code/controllers/subsystem/weather.dm @@ -41,5 +41,14 @@ SUBSYSTEM_DEF(weather) if(W.name == weather_name && W.target_z == Z) W.telegraph() +/datum/controller/subsystem/weather/proc/is_weather_affecting_area(area/A, weather_datum_type) + for(var/V in processing) + var/datum/weather/W = V + if(!istype(W, weather_datum_type)) + continue + if(A in W.impacted_areas) + return TRUE + return FALSE + /datum/controller/subsystem/weather/proc/make_z_eligible(zlevel) eligible_zlevels |= zlevel