Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes Autoinjectors and Some Hyposprays Working on Robotic/Missing Limbs, Minor Refactor of can_inject() and Related Variables #27118

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Fordoxia
Copy link
Contributor

@Fordoxia Fordoxia commented Oct 15, 2024

What Does This PR Do

Hyposprays (and by extension autoinjectors) no longer ignore can_inject() if they are piercing hyposprays, and can_inject() now checks for robotic/missing limbs before anything else. This prevents hyposprays and autoinjectors from injecting robotic and missing limbs.

Hyposprays now check for targeted body zones like other handheld injectors do.

Several injection items have had their local variables name changed so they obviously are referring to the ability to defeat thick clothing.

The unused piercing variable has been renamed penetrate_everything so it's immediately obvious that it will always return TRUE if the missing/robotics limb checks succeed. Autoinjectors and piercing hyposprays (CMO/emagged/Syndicate/Deathsquad) have been given this characteristic due to it being how they currently behave on live, but it's now very easy to change the behaviour for individual hyposprays and injectors.

Why It's Good For The Game

You're not supposed to be able to inject into robotic/missing body parts.

There is now more granular control over the piercing behaviours of hyposprays and autoinjectors.

There is now a single variable that can be tweaked for tems doing an injection check if we want them to be able to bypass all injection protection without fuss.

Testing

Spawned a bunch of syringes, a dart gun, an RSG, hypospray, CMO hypospray, DS hypospray, and some autoinjectors.
Used them on test skrell with various protections (or lack thereof) to check that nothing got broken.

Everything worked good.


Declaration

  • I confirm that I either do not require pre-approval for this PR, or I have obtained such approval and have included a screenshot to demonstrate this below.


Changelog

🆑
fix: Hyposprays and autoinjectors no longer inject into missing or robotic limbs.
/:cl:

@Fordoxia Fordoxia changed the title Fixes Autoinjectors and Some Hyposprays Working on Robotic/Missing Limbs Fixes Autoinjectors and Some Hyposprays Working on Robotic/Missing Limbs, Minor Refactor of can_inject() and Related Variables Oct 15, 2024
@ParadiseSS13-Bot ParadiseSS13-Bot added the -Status: Awaiting type assignment This PR is waiting for its type to be assigned internally label Oct 15, 2024
@ParadiseSS13-Bot ParadiseSS13-Bot added -Status: Awaiting review This PR is awaiting review from the review team and removed -Status: Awaiting type assignment This PR is waiting for its type to be assigned internally labels Oct 21, 2024
@silverplatedelta silverplatedelta added the Fix This PR will fix an issue in the game label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Status: Awaiting review This PR is awaiting review from the review team Fix This PR will fix an issue in the game
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants