This commit is contained in:
silicons
2020-06-30 05:19:50 -07:00
parent 2039496739
commit f03343b516
2 changed files with 8 additions and 6 deletions

View File

@@ -87,11 +87,11 @@
if(SEND_SIGNAL(src, COMSIG_LIVING_ACTIVE_BLOCK_START, I, other_items) & COMPONENT_PREVENT_BLOCK_START)
to_chat(src, "<span class='warning'>Something is preventing you from blocking!</span>")
return
if(!I?.can_active_block() && length(other_items))
I = other_items[1]
if(!I)
to_chat(src, "<span class='warning'>You can't block with your bare hands!</span>")
return
if(!length(other_items))
to_chat(src, "<span class='warning'>You can't block with your bare hands!</span>")
return
I = other_items[1]
if(!I.can_active_block())
to_chat(src, "<span class='warning'>[I] is either not capable of being used to actively block, or is not currently in a state that can! (Try wielding it if it's twohanded, for example.)</span>")
return
@@ -121,7 +121,8 @@
for(var/obj/item/I in held_items - held)
if(I.can_active_block())
return I
return held
else
return held
/**
* Proc called by keybindings to stop active blocking.

View File

@@ -132,6 +132,7 @@
"<span class='notice'>You extend [holder] from your [zone == BODY_ZONE_R_ARM ? "right" : "left"] arm.</span>",
"<span class='italics'>You hear a short mechanical noise.</span>")
playsound(get_turf(owner), 'sound/mecha/mechmove03.ogg', 50, 1)
return TRUE
/obj/item/organ/cyberimp/arm/ui_action_click()
if(crit_fail || (organ_flags & ORGAN_FAILING) || (!holder && !contents.len))
@@ -289,7 +290,7 @@
UnregisterSignal(owner, COMSIG_LIVING_ACTIVE_BLOCK_START)
return ..()
/obj/item/organ/cyberimp/arm/shield/proc/on_signal(datum/source, obj/item/blocking_item, list/other_items = list())
/obj/item/organ/cyberimp/arm/shield/proc/on_signal(datum/source, obj/item/blocking_item, list/other_items)
if(!blocking_item) //if they don't have something
var/obj/item/shield/S = locate() in contents
if(!Extend(S, TRUE))