nayser
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user