diff --git a/code/game/atoms.dm b/code/game/atoms.dm index d7223c1209d..d8dd3bb44c8 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -273,6 +273,12 @@ /atom/proc/HasProximity(atom/movable/AM) return +/** + * Proc which will make the atom act accordingly to an EMP. + * This proc can sleep depending on the implementation. So assume it sleeps! + * + * severity - The severity of the EMP. Either EMP_HEAVY or EMP_LIGHT + */ /atom/proc/emp_act(severity) return diff --git a/code/game/objects/empulse.dm b/code/game/objects/empulse.dm index 3b89a3d0ce9..827968ae0e6 100644 --- a/code/game/objects/empulse.dm +++ b/code/game/objects/empulse.dm @@ -1,3 +1,13 @@ +/** + * Will cause an EMP on the given epicenter. + * This proc can sleep depending on the affected objects. So assume it sleeps! + * + * epicenter - The center of the EMP. Can be an atom, as long as the given atom is on a turf (in)directly + * heavy_range - The max distance from the epicenter where objects will be get heavy EMPed + * light_range - The max distance from the epicenter where objects will get light EMPed + * log - Whether or not this action should be logged or not. Will use the cause if provided + * cause - The cause of the EMP. Used for the logging + */ /proc/empulse(turf/epicenter, heavy_range, light_range, log = FALSE, cause = null) if(!epicenter) return diff --git a/code/game/objects/items/weapons/implants/implant_misc.dm b/code/game/objects/items/weapons/implants/implant_misc.dm index 9c4049e8904..675b453f92d 100644 --- a/code/game/objects/items/weapons/implants/implant_misc.dm +++ b/code/game/objects/items/weapons/implants/implant_misc.dm @@ -58,7 +58,7 @@ /obj/item/implant/emp/activate() uses-- - empulse(imp_in, 3, 5, 1) + INVOKE_ASYNC(GLOBAL_PROC, .proc/empulse, get_turf(imp_in), 3, 5, 1) if(!uses) qdel(src)