Can't have infinite EMP implant charges anymore (#16469)

* Can't have infinite EMP implant charges anymore
 + Makes the EMP implant call empulse async

* pulse pulse
This commit is contained in:
Farie82
2021-08-02 13:47:24 +01:00
committed by GitHub
parent baf15f25a7
commit 398ac7b286
3 changed files with 17 additions and 1 deletions
+10
View File
@@ -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
@@ -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)