This commit is contained in:
silicons
2020-06-29 23:37:51 -07:00
parent 3c4a288ecc
commit 3b3a3ad44e
4 changed files with 49 additions and 7 deletions
+19 -2
View File
@@ -273,12 +273,29 @@
desc = "A deployable riot shield to help deal with civil unrest."
contents = newlist(/obj/item/shield/riot/implant)
/obj/item/organ/cyberimp/arm/shield/Extend(obj/item/I)
/obj/item/organ/cyberimp/arm/shield/Extend(obj/item/I, silent = FALSE)
if(I.obj_integrity == 0) //that's how the shield recharge works
to_chat(owner, "<span class='warning'>[I] is still too unstable to extend. Give it some time!</span>")
if(!silent)
to_chat(owner, "<span class='warning'>[I] is still too unstable to extend. Give it some time!</span>")
return FALSE
return ..()
/obj/item/organ/cyberimp/arm/shield/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
. = ..()
if(.)
RegisterSignal(M, COMSIG_LIVING_START_ACTIVE_BLOCKING, .proc/on_signal)
/obj/item/organ/cyberimp/arm/shield/Remove(special = FALSE)
UnregisterSignal(owner, COMSIG_LIVING_START_ACTIVE_BLOCKING)
return ..()
/obj/item/organ/cyberimp/arm/shield/proc/on_signal(datum/source, obj/item/blocking_item, list/other_items = list())
if(!blocking_item) //if they don't have something
var/obj/item/shield/S = locate() in contents
if(!Extend(S, TRUE))
return
other_items += S
/obj/item/organ/cyberimp/arm/shield/emag_act()
. = ..()
if(obj_flags & EMAGGED)