Makes EMP actually usefull on reactive armor (#15023)

This commit is contained in:
Qwertytoforty
2020-12-05 10:33:13 +00:00
committed by GitHub
parent d048bca6ae
commit 8829e81ef5
+11 -2
View File
@@ -260,7 +260,8 @@
/obj/item/clothing/suit/armor/reactive
name = "reactive armor"
desc = "Doesn't seem to do much for some reason."
var/active = 0
var/active = FALSE
var/emp_d = FALSE
icon_state = "reactiveoff"
item_state = "reactiveoff"
blood_overlay_type = "armor"
@@ -271,6 +272,9 @@
/obj/item/clothing/suit/armor/reactive/attack_self(mob/user)
active = !(active)
if(emp_d)
to_chat(user, "<span class='warning'>[src] is disabled from an electromagnetic pulse!</span>")
return
if(active)
to_chat(user, "<span class='notice'>[src] is now active.</span>")
icon_state = "reactive"
@@ -286,14 +290,19 @@
A.UpdateButtonIcon()
/obj/item/clothing/suit/armor/reactive/emp_act(severity)
active = 0
active = FALSE
emp_d = TRUE
icon_state = "reactiveoff"
item_state = "reactiveoff"
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/C = loc
C.update_inv_wear_suit()
addtimer(CALLBACK(src, .proc/reboot), 100 / severity)
..()
/obj/item/clothing/suit/armor/reactive/proc/reboot()
emp_d = FALSE
//When the wearer gets hit, this armor will teleport the user a short distance away (to safety or to more danger, no one knows. That's the fun of it!)
/obj/item/clothing/suit/armor/reactive/teleport
name = "reactive teleport armor"