|
|
|
@@ -345,13 +345,13 @@
|
|
|
|
|
/obj/item/projectile/tentacle/on_hit(atom/target, blocked = FALSE)
|
|
|
|
|
var/mob/living/carbon/human/H = firer
|
|
|
|
|
if(blocked >= 100)
|
|
|
|
|
return 0
|
|
|
|
|
return BULLET_ACT_BLOCK
|
|
|
|
|
if(isitem(target))
|
|
|
|
|
var/obj/item/I = target
|
|
|
|
|
if(!I.anchored)
|
|
|
|
|
to_chat(firer, "<span class='notice'>You pull [I] right into your grasp.</span>")
|
|
|
|
|
H.put_in_hands(I) //Because throwing it is goofy as fuck and unreliable. If you land the tentacle despite the penalties to accuracy, you should have your reward.
|
|
|
|
|
. = 1
|
|
|
|
|
. = BULLET_ACT_HIT
|
|
|
|
|
|
|
|
|
|
else if(isliving(target))
|
|
|
|
|
var/mob/living/L = target
|
|
|
|
@@ -366,7 +366,7 @@
|
|
|
|
|
if(INTENT_HELP)
|
|
|
|
|
C.visible_message("<span class='danger'>[L] is pulled by [H]'s tentacle!</span>","<span class='userdanger'>A tentacle grabs you and pulls you towards [H]!</span>")
|
|
|
|
|
C.throw_at(get_step_towards(H,C), 8, 2)
|
|
|
|
|
return 1
|
|
|
|
|
return BULLET_ACT_HIT
|
|
|
|
|
|
|
|
|
|
if(INTENT_DISARM)
|
|
|
|
|
var/obj/item/I = C.get_active_held_item()
|
|
|
|
@@ -374,27 +374,27 @@
|
|
|
|
|
if(C.dropItemToGround(I))
|
|
|
|
|
C.visible_message("<span class='danger'>[I] is yanked off [C]'s hand by [src]!</span>","<span class='userdanger'>A tentacle pulls [I] away from you!</span>")
|
|
|
|
|
on_hit(I) //grab the item as if you had hit it directly with the tentacle
|
|
|
|
|
return 1
|
|
|
|
|
return BULLET_ACT_HIT
|
|
|
|
|
else
|
|
|
|
|
to_chat(firer, "<span class='danger'>You can't seem to pry [I] off [C]'s hands!</span>")
|
|
|
|
|
return 0
|
|
|
|
|
return BULLET_ACT_BLOCK
|
|
|
|
|
else
|
|
|
|
|
to_chat(firer, "<span class='danger'>[C] has nothing in hand to disarm!</span>")
|
|
|
|
|
return 0
|
|
|
|
|
return BULLET_ACT_HIT
|
|
|
|
|
|
|
|
|
|
if(INTENT_GRAB)
|
|
|
|
|
C.visible_message("<span class='danger'>[L] is grabbed by [H]'s tentacle!</span>","<span class='userdanger'>A tentacle grabs you and pulls you towards [H]!</span>")
|
|
|
|
|
C.throw_at(get_step_towards(H,C), 8, 2, H, TRUE, TRUE, callback=CALLBACK(src, .proc/tentacle_grab, H, C))
|
|
|
|
|
return 1
|
|
|
|
|
return BULLET_ACT_HIT
|
|
|
|
|
|
|
|
|
|
if(INTENT_HARM)
|
|
|
|
|
C.visible_message("<span class='danger'>[L] is thrown towards [H] by a tentacle!</span>","<span class='userdanger'>A tentacle grabs you and throws you towards [H]!</span>")
|
|
|
|
|
C.throw_at(get_step_towards(H,C), 8, 2, H, TRUE, TRUE, callback=CALLBACK(src, .proc/tentacle_stab, H, C))
|
|
|
|
|
return 1
|
|
|
|
|
return BULLET_ACT_HIT
|
|
|
|
|
else
|
|
|
|
|
L.visible_message("<span class='danger'>[L] is pulled by [H]'s tentacle!</span>","<span class='userdanger'>A tentacle grabs you and pulls you towards [H]!</span>")
|
|
|
|
|
L.throw_at(get_step_towards(H,L), 8, 2)
|
|
|
|
|
. = 1
|
|
|
|
|
. = BULLET_ACT_HIT
|
|
|
|
|
|
|
|
|
|
/obj/item/projectile/tentacle/Destroy()
|
|
|
|
|
qdel(chain)
|
|
|
|
|