Skip to content

Commit

Permalink
Fixes tackles causing semi-permanent slowdown, and not being able to …
Browse files Browse the repository at this point in the history
…trigger grabs (#2560)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

Tackles allow setGrabState() to be called without confirming a grab
exists, this causes usually grab-related stuff to trigger, mainly the
slowdown for having someone grabbed, without actually having grabbed
anyone. As far as I can tell, this would maybe only occur if you
succeeded a tackle roll that caused a grab when stamcritting yourself

The channel for standing up, however, was still being applied after the
tackle purges the attacker's knockdown (and you cannot, unfortunately,
grab people while prone), preventing either grab roll from ever causing
a grab. Now, you stand up instantly if your tackle would result in a
grab.


![image](https://github.com/shiptest-ss13/Shiptest/assets/24857008/dc1686ad-9c55-4e92-b980-53752eca94e8)

## Why It's Good For The Game

fixes #2340 

## Changelog

🆑 
fix: Tackles no longer have a chance to give permanent slowdown until
you grab someone
fix: Tackles which would result in a grab now actually result in a grab
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
SomeguyManperson authored Dec 6, 2023
1 parent 8c3c0a4 commit ef06ec3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions code/datums/components/tackle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -208,26 +208,30 @@
to_chat(target, "<span class='userdanger'>[user] lands an expert tackle on you, knocking you down hard and maintaining a passive grab!</span>")

user.SetKnockdown(0)
user.get_up(TRUE)
user.forceMove(get_turf(target))
target.adjustStaminaLoss(40)
target.Paralyze(5)
target.Knockdown(30)
if(ishuman(target) && ishuman(user))
INVOKE_ASYNC(S.dna.species, TYPE_PROC_REF(/datum/species, grab), S, T)
S.setGrabState(GRAB_PASSIVE)
if(S.pulling == T)
S.setGrabState(GRAB_PASSIVE)

if(5 to INFINITY) // absolutely BODIED
user.visible_message("<span class='warning'>[user] lands a monster tackle on [target], knocking [target.p_them()] senseless and applying an aggressive pin!</span>", "<span class='userdanger'>You land a monster tackle on [target], knocking [target.p_them()] senseless and applying an aggressive pin!</span>", target)
to_chat(target, "<span class='userdanger'>[user] lands a monster tackle on you, knocking you senseless and aggressively pinning you!</span>")

user.SetKnockdown(0)
user.get_up(TRUE)
user.forceMove(get_turf(target))
target.adjustStaminaLoss(40)
target.Paralyze(5)
target.Knockdown(30)
if(ishuman(target) && ishuman(user))
INVOKE_ASYNC(S.dna.species, TYPE_PROC_REF(/datum/species, grab), S, T)
S.setGrabState(GRAB_AGGRESSIVE)
if(S.pulling == T)
S.setGrabState(GRAB_AGGRESSIVE)


return COMPONENT_MOVABLE_IMPACT_FLIP_HITPUSH
Expand Down

0 comments on commit ef06ec3

Please sign in to comment.