From 770ab32399012ea692ef57eee998046c7f6169e9 Mon Sep 17 00:00:00 2001 From: Casey Date: Mon, 22 Nov 2021 23:40:43 -0500 Subject: [PATCH 1/2] Merge pull request #11907 from Heroman3003/wallrot Makes wallrot affect all station z-levels (but not dorms) --- code/modules/events/wallrot.dm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/events/wallrot.dm b/code/modules/events/wallrot.dm index e09cc50d2f..1909fc5d00 100644 --- a/code/modules/events/wallrot.dm +++ b/code/modules/events/wallrot.dm @@ -7,10 +7,13 @@ // 100 attempts for(var/i=0, i<100, i++) - var/turf/candidate = locate(rand(1, world.maxx), rand(1, world.maxy), 1) + var/z_level = pick(using_map.station_levels) + var/turf/candidate = locate(rand(1, world.maxx), rand(1, world.maxy), z_level) if(istype(candidate, /turf/simulated/wall)) center = candidate - return 1 + var/area/A = get_area(candidate) + if(!A.forbid_events) + return 1 return 0 /datum/event/wallrot/announce()