Use required number of legs to determine if standing fails #2761
+9
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About the PR
Uses the components
RequiredLegs
field to determine if an entity can stand or not, rather than checking for 0. As it turns out, borgs don't have any legs so they will always cancel the stand attempt. Thus they always stay fallen over once they've been repaired.Fixes #2738
Why / Balance
Needs to be fixed because borgs that are prone can only be hit with direct shots to their sprite, not collisions via normal bullets.
This also means that currently users with one a single leg and still stand and move around like normal, which is not ideal.
Technical details
There's a slight weirdness in that the attempt to stand doesn't check whether users can actually do so. So when a user with 1 leg is prone (from the surgery to amputate) presses the default button standing/prone toggle, a DoAfter appears and then nothing occurs. If they press it again then the sound of falling to the floor plays as well.
To fix that I've added a local event to check whether the user would even pass that test to begin with so we don't bother allowing them to even try and stand up.
Media
N/A
Requirements
Breaking changes
Changelog
🆑