[MIRROR] Fixes ejecting pAIs card without a pAI in it #1659
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.
Mirrored on Nova: NovaSector/NovaSector#578
Original PR: tgstation/tgstation#81047
About The Pull Request
I had made the bad assumption that a pAI card always had a pAI mob in it, which is not the case.
This fixes the runtime error, thus allowing people to eject a pAI card that doesn't have a pAI in it.
I've also added a check in the pAI's Initialize to give them the ability to use the modPC if they are made in it, so you don't have to eject and reinsert the pAI, fixing another issue.
Why It's Good For The Game
Closes tgstation/tgstation#81043
Fixes inconsistency and runtime.
Changelog
🆑 JohnFulpWillard
fix: pAIs downloaded while in a PDA now gets the action button to control said PDA.
fix: pAI cards can now be ejected from a PDA when there is no pAI inhabiting it.
/:cl: