[MIRROR] Gulag Teleporter Will Now Always Properly Strip Inventory #2965
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.
Original PR:
https://api.github.com/repos/tgstation/tgstation/pulls/82045
About The Pull Request
Fixes #81931
I believe what was happening (as mentioned in the issue report) is that
occupant
would become temporarily null as the "stripping" proc would run during the escape (and the server might have yielded a few ticks during those move cycles)- so let's rectify this by decreasing the dependence on that variable by passing in the argument of our prisoner to that same proc to ensure that if we teleport, they are definitely stripped without having to deal with null weirdness.I also cleaned up the code as well as another bug where if the reclaimer was broken, we would forceMove stuff into the machine itself, rather than the turf of the machine. that feels really weird so I just patched that up (makes the code look a lot better too since we can cram it in the "handcuffs" case).
Why It's Good For The Game
Prisoners shouldn't have their gear if they get into the gulag. I know it's a bit weird because it might be a skill issue on the security officer's behalf should they keep the door unlocked but it's even stranger for it to just not work the way it was intended.
Changelog
🆑
fix: Prisoners who are teleported to the Nanotrasen Work Camp should now always be stripped of their gear to prevent escapes.
/:cl: