Skip to content

Commit

Permalink
Tentacle fix 2, no runtime on adjacent hit, cling beartrap activates …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
HMBGERDO and lewcc authored Feb 2, 2025
1 parent 1911df9 commit c87143f
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions code/modules/antagonists/changeling/powers/mutations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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>"
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c87143f

Please sign in to comment.