Revert "Undo meteor shield changes" (#9361)

This commit is contained in:
Kashargul
2024-11-08 19:28:07 +01:00
committed by GitHub
parent 686d485bce
commit c9dda5add8
2 changed files with 22 additions and 0 deletions

View File

@@ -22,6 +22,10 @@
/datum/event/meteor_wave/start() /datum/event/meteor_wave/start()
affecting_z -= global.using_map.sealed_levels // Space levels only please! affecting_z -= global.using_map.sealed_levels // Space levels only please!
//CHOMPAdd Start, fills gaps
for(var/obj/machinery/shield_gen/gen in global.machines)
gen.fill_diffused()
//CHOMPAdd End
..() ..()
/datum/event/meteor_wave/announce() /datum/event/meteor_wave/announce()
@@ -60,6 +64,10 @@
/datum/event/meteor_wave/end() /datum/event/meteor_wave/end()
..() ..()
//CHOMPAdd Start, fills gaps
for(var/obj/machinery/shield_gen/gen in global.machines)
gen.fill_diffused()
//CHOMPAdd End
if(!victim) if(!victim)
switch(severity) switch(severity)
if(EVENT_LEVEL_MAJOR) if(EVENT_LEVEL_MAJOR)

View File

@@ -258,6 +258,20 @@
for(var/mob/M in view(5,src)) for(var/mob/M in view(5,src))
to_chat(M, "[icon2html(src, M.client)] You hear heavy droning fade out.") to_chat(M, "[icon2html(src, M.client)] You hear heavy droning fade out.")
shield_hum.stop() shield_hum.stop()
// CHOMPAdd Start - Fills gaps when meteors happen
/obj/machinery/shield_gen/proc/fill_diffused()
if(active)
var/list/covered_turfs = get_shielded_turfs()
var/turf/T = get_turf(src)
var/obj/effect/energy_field/E
if(T in covered_turfs)
covered_turfs.Remove(T)
for(var/turf/O in covered_turfs)
if(locate(/obj/effect/energy_field, O) || locate(/obj/machinery/pointdefense, orange(2, O)))
continue
E = new(O, src)
field.Add(E)
// CHOMPAdd End
/obj/machinery/shield_gen/update_icon() /obj/machinery/shield_gen/update_icon()
if(stat & BROKEN) if(stat & BROKEN)