Fix area selection for electrical fault and containment subroutine events

This commit is contained in:
Cerebulon
2023-01-23 21:56:41 +00:00
parent 2009c45324
commit 4c9620b9cd
3 changed files with 46 additions and 14 deletions
@@ -8,9 +8,6 @@
/datum/event2/meta/wallrot/get_weight()
return (10 + metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10) / (times_ran + 1)
/datum/event2/event/wallrot
var/turf/simulated/wall/origin = null
@@ -42,6 +39,3 @@
rot_count++
if(rot_count >= target_rot)
break
@@ -35,12 +35,10 @@
to cause voltage spikes and other electrical issues very soon. Please secure sensitive electrical equipment until the situation passes.", "[location_name()] Sensor Array")
/datum/event2/event/electrical_fault/set_up()
valid_z_levels = get_location_z_levels()
valid_z_levels -= using_map.sealed_levels // Space levels only please!
valid_apcs = list()
for(var/obj/machinery/power/apc/A in global.machines)
if(A.z in valid_z_levels)
for(var/obj/machinery/power/apc/A in machines)
if(A.z in using_map.station_levels)
valid_apcs += A
/datum/event2/event/electrical_fault/start()
@@ -97,4 +95,3 @@
// log_debug("ELECTRICAL EVENT: Emagged \the [A].")
playsound(A, 'sound/machines/chime.ogg', 50, 1)
apcs_emagged++