Files
Bubberstation/code/datums
_0Steven 9743493039 Fixes trims without a job whose title matches its assignment, but with an associated job, assigning null account jobs (#86894)
## 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:

https://github.com/tgstation/tgstation/blob/8c3c9a6ea29bf32385c148c5294e3f6a18f57bf3/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:

https://github.com/tgstation/tgstation/blob/8c3c9a6ea29bf32385c148c5294e3f6a18f57bf3/code/modules/jobs/job_types/security_officer.dm#L1-L2

https://github.com/tgstation/tgstation/blob/8c3c9a6ea29bf32385c148c5294e3f6a18f57bf3/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.
/🆑
2024-09-28 20:18:48 +02:00
..
2024-09-23 22:24:50 -07:00
2024-08-21 17:07:02 +12:00
2024-08-21 17:07:02 +12:00
2024-08-21 17:07:02 +12:00
2024-08-21 17:07:02 +12:00
2024-08-23 21:49:46 +02:00
2024-08-25 03:53:44 -04:00
2024-08-21 17:07:02 +12:00