[MIRROR] Alternate job titles such as chef and department security get injected to the manifest normally, and show up as the right department. #2291
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#1296
Original PR: tgstation/tgstation#81634
About The Pull Request
Previously injecting to the manifest would use solely the mind's assigned role, thus injecting player with alternate job titles such as chef and department security as the job they're based off rather than their actual ID trim.
Then if the manifest were to be updated later on, they would show up as being departmentless because getting the manifest checks for an assigned job, which these don't have as they're just alternate titles for an existing job.
This resolves the first part by checking if it's possible to get a trim from a held ID and using that before attempting to default to the mind's assigned role. As building/updating the manifest is done after equipping, this lets alternate job titles be assigned as their actual job.
Then the second part is resolved by adding a list of alternate titles for the job subsystem to register as being that job, so that a job can have multiple titles which refer to it.
Why It's Good For The Game
It's annoying to not be able to find these in the right spot on the manifest, if at all in the first place.
Edit: Fixes #81378.
Edit: Fixes #67703.
Changelog
🆑 00-Steven
fix: Alternate job titles such as chef and department security actually get injected to the manifest as their respective ID trims, instead of being assigned the job they're based off.
fix: Alternate job titles such as chef and department security actually show up under the right department on the manifest, instead of no department.
/:cl: