mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-04-15 16:53:11 +01:00
## About The Pull Request Previously our code for getting the job associated with a trim involved checking the assignment against every possible job's title:8c3c9a6ea2/code/datums/id_trim/_id_trim.dm (L32-L36)This, however, didn't work with departmental security officers, as their job title doesn't match the trim assignment:8c3c9a6ea2/code/modules/jobs/job_types/security_officer.dm (L1-L2)8c3c9a6ea2/code/datums/id_trim/jobs.dm (L1103-L1104)Instead, we remove this code and replace it with a `/datum/id_trim/job` subtype proc that just returns the `job` variable, which this subtype has. This fixes our problem. We leave the parent `find_job()` proc just returning null, as to avoid needing an `istype(...)` check where we call it, and as `/datum/id_trim/job` is associated with _station_ jobs while there may be cases where we want a non-station id trim to be able to return an associated job. ## Why It's Good For The Game Fixes #86887. ## Changelog 🆑 fix: Fixed trims which did have an associated job but whose assignment didn't match a job title causing null jobs to be assigned to accounts. This fixes departmental security officers not being able to purchase things from the security vendors. /🆑