mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Tentacle fix 2, no runtime on adjacent hit, cling beartrap activates now (#28175)
* tentacle beartrap works now, tentacle no longer causes runtimes on melee shots * yeah well lets do it that way * this should be here too * i am not stupid trust me * this name is better? * Update code/modules/antagonists/changeling/powers/mutations.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: HMBGERDO <61080616+HMBGERDO@users.noreply.github.com> --------- Signed-off-by: HMBGERDO <61080616+HMBGERDO@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
@@ -213,6 +213,20 @@
|
||||
throw_range = 0
|
||||
throw_speed = 0
|
||||
var/datum/action/changeling/weapon/parent_action
|
||||
/// Used for deleting gun after hitting something
|
||||
var/hit_something = FALSE
|
||||
/// True if we're shooting our shot -- used to track shooting to prevent deleting mid shot
|
||||
var/shooting_right_now = FALSE
|
||||
|
||||
/obj/item/gun/magic/tentacle/process_fire(atom/target, mob/living/user, message, params, zone_override, bonus_spread)
|
||||
shooting_right_now = TRUE
|
||||
. = ..()
|
||||
shooting_right_now = FALSE
|
||||
check_should_delete()
|
||||
|
||||
/obj/item/gun/magic/tentacle/proc/check_should_delete()
|
||||
if(!shooting_right_now && hit_something)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/gun/magic/tentacle/customised_abstract_text(mob/living/carbon/owner)
|
||||
return "<span class='warning'>[owner.p_their(TRUE)] [owner.l_hand == src ? "left arm" : "right arm"] has been turned into a grotesque tentacle.</span>"
|
||||
@@ -294,7 +308,8 @@
|
||||
|
||||
/obj/item/projectile/tentacle/on_hit(atom/target, blocked = 0)
|
||||
var/mob/living/carbon/human/H = firer
|
||||
qdel(source.gun)
|
||||
source.gun.hit_something = TRUE
|
||||
source.gun.check_should_delete()
|
||||
if(blocked >= 100)
|
||||
return FALSE
|
||||
if(isitem(target))
|
||||
@@ -353,8 +368,8 @@
|
||||
add_attack_logs(H, C, "imobilised with a changeling tentacle")
|
||||
if(!iscarbon(H))
|
||||
return TRUE
|
||||
var/obj/item/restraints/legcuffs/beartrap/changeling/B = new(H.loc)
|
||||
B.Crossed(C)
|
||||
var/obj/item/restraints/legcuffs/beartrap/changeling/B = new(get_turf(L))
|
||||
B.on_atom_entered(C, L)
|
||||
return TRUE
|
||||
|
||||
if(INTENT_HARM)
|
||||
|
||||
Reference in New Issue
Block a user