Skip to content

Commit

Permalink
[MIRROR] fixes ebolas whiffing on prone targets and leaving junk behi…
Browse files Browse the repository at this point in the history
…nd [MDB IGNORE] (#2947)

* fixes ebolas whiffing on prone targets and leaving junk behind (#83708)

## About The Pull Request

Makes energy bolas work on prone targets and not leave behind garbage
when they'd whiff.

Ever notice how you could crawl through one unlike other bolas and how,
if you got hit by one while prone, it left behind a little blue
bear-trap looking thing?

#60160 gave them the ability to be blocked and to hit flying mobs, but
it did this by making them create a subtype of bear trap on the location
on hitting a valid atom. This meant that if the target lacked a leg, was
prone, or already had a bola on, the bear trap object would be left
behind and the bola would do nothing.

This fixes that. Does not seem to have been intended behavior.

## Why It's Good For The Game

Fix good.

## Changelog

:cl:
fix: energy bolas now work on prone targets and don't leave behind a
fake item when they whiff.
/:cl:

---------

Co-authored-by: MrMelbert <[email protected]>

* fixes ebolas whiffing on prone targets and leaving junk behind

---------

Co-authored-by: Higgin <[email protected]>
Co-authored-by: MrMelbert <[email protected]>
Co-authored-by: NovaBot13 <[email protected]>
  • Loading branch information
4 people authored and StealsThePRs committed Jun 9, 2024
1 parent d4c581e commit 88629fa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions code/game/objects/items/handcuffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@
* Does not trigger on tiny mobs.
* If ignore_movetypes is FALSE, does not trigger on floating / flying / etc. mobs.
*/
/obj/item/restraints/legcuffs/beartrap/proc/spring_trap(atom/movable/target, ignore_movetypes = FALSE)
/obj/item/restraints/legcuffs/beartrap/proc/spring_trap(atom/movable/target, ignore_movetypes = FALSE, hit_prone = FALSE)
if(!armed || !isturf(loc) || !isliving(target))
return

Expand All @@ -477,7 +477,7 @@
victim.visible_message(span_danger("[victim] triggers \the [src]."), \
span_userdanger("You trigger \the [src]!"))
var/def_zone = BODY_ZONE_CHEST
if(iscarbon(victim) && victim.body_position == STANDING_UP)
if(iscarbon(victim) && (victim.body_position == STANDING_UP || hit_prone))
var/mob/living/carbon/carbon_victim = victim
def_zone = pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
if(!carbon_victim.legcuffed && carbon_victim.num_legs >= 2) //beartrap can't cuff your leg if there's already a beartrap or legcuffs, or you don't have two legs.
Expand Down Expand Up @@ -595,7 +595,9 @@

/obj/item/restraints/legcuffs/bola/energy/ensnare(atom/hit_atom)
var/obj/item/restraints/legcuffs/beartrap/energy/cyborg/B = new (get_turf(hit_atom))
B.spring_trap(hit_atom, ignore_movetypes = TRUE)
B.spring_trap(hit_atom, ignore_movetypes = TRUE, hit_prone = TRUE)
if(B.loc != hit_atom)
qdel(B)
qdel(src)

/**
Expand Down

0 comments on commit 88629fa

Please sign in to comment.