diff --git a/code/game/gamemodes/clock_cult/clock_machines.dm b/code/game/gamemodes/clock_cult/clock_machines.dm index e374ed617d8..9e450b3da08 100644 --- a/code/game/gamemodes/clock_cult/clock_machines.dm +++ b/code/game/gamemodes/clock_cult/clock_machines.dm @@ -404,15 +404,20 @@ return if(disabled) visible_message("The writhing tendrils return to the gemstone, which begins to glow with power!") - flick("[initial(icon_state)]_recharged", src) + flick("interdiction_lens_recharged", src) disabled = FALSE toggle(0) else var/successfulprocess = FALSE var/power_drained = 0 var/list/atoms_to_test = list() - for(var/atom/movable/M in urange(interdiction_range, src)) - atoms_to_test |= M + for(var/A in spiral_range_turfs(interdiction_range, src)) + var/turf/T = A + for(var/M in T) + atoms_to_test |= M + + CHECK_TICK + for(var/M in atoms_to_test) if(istype(M, /obj/machinery/power/apc)) var/obj/machinery/power/apc/A = M @@ -451,19 +456,20 @@ var/datum/effect_system/spark_spread/spks = new(get_turf(R)) spks.set_up(3, 0, get_turf(R)) spks.start() + + CHECK_TICK + if(!return_power(power_drained) || power_drained < 50) //failed to return power drained or too little power to return successfulprocess = FALSE if(try_use_power(disrupt_cost) && total_accessable_power() >= disrupt_cost) //if we can disable at least one object playsound(src, 'sound/items/PSHOOM.ogg', 50, 1, interdiction_range-7, 1) for(var/M in atoms_to_test) - if(ismob(M)) - flash_color(M, flash_color="#EE54DE", flash_time=5) - else if(istype(M, /obj/machinery/light)) //cosmetic light flickering + if(istype(M, /obj/machinery/light)) //cosmetic light flickering var/obj/machinery/light/L = M if(L.on) playsound(L, 'sound/effects/light_flicker.ogg', 50, 1) L.flicker(3) - if(istype(M, /obj/machinery/camera)) + else if(istype(M, /obj/machinery/camera)) var/obj/machinery/camera/C = M if(C.isEmpProof() || !C.status) continue @@ -481,7 +487,7 @@ if(!try_use_power(disrupt_cost)) break O.emp_act(1) - else //there's probably not another radio in that radio, right? + else if(isliving(M) || istype(M, /obj/structure/closet) || istype(M, /obj/item/weapon/storage)) //other things may have radios in them but we don't care var/atom/movable/A = M for(var/obj/item/device/radio/O in A.GetAllContents()) successfulprocess = TRUE @@ -490,10 +496,13 @@ if(!try_use_power(disrupt_cost)) break O.emp_act(1) + + CHECK_TICK + if(!successfulprocess) visible_message("The gemstone suddenly turns horribly dark, writhing tendrils covering it!") recharging = world.time + recharge_time - flick("[initial(icon_state)]_discharged", src) + flick("interdiction_lens_discharged", src) icon_state = "interdiction_lens_inactive" SetLuminosity(2,1) disabled = TRUE