#60690 added a feature to job ID trims allowing them to set a proper job for the bank account.

However, it used job datums instead of job singletons. Vending machines expect bank accounts to have job singletons.

I have added a simple fix. In New(), the appropriate job singleton will be instantiated in place of the ID card's job path.

All other code utilising this variable in game/machinery/accounting.dm now just works.
This commit is contained in:
Timberpoes
2021-11-12 09:23:30 +00:00
committed by GitHub
parent 0373158742
commit 1db6a0c121
+5 -2
View File
@@ -21,10 +21,13 @@
var/config_job
/// An ID card with an access in this list can apply this trim to IDs or use it as a job template when adding access to a card. If the list is null, cannot be used as a template. Should be Head of Staff or ID Console accesses or it may do nothing.
var/list/template_access
/// The typepath to the job datum from the id_trim.
var/datum/job/job
/// The typepath to the job datum from the id_trim. This is converted to one of the job singletons in New().
var/datum/job/job = /datum/job/unassigned
/datum/id_trim/job/New()
if(ispath(job))
job = SSjob.GetJobType(job)
if(isnull(job_changes))
job_changes = SSmapping.config.job_changes