From 1db6a0c121ea20fd1dcd0755ef3e950e2a109ba1 Mon Sep 17 00:00:00 2001 From: Timberpoes Date: Fri, 12 Nov 2021 09:23:30 +0000 Subject: [PATCH] Feex (#62734) #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. --- code/datums/id_trim/jobs.dm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/datums/id_trim/jobs.dm b/code/datums/id_trim/jobs.dm index dbac60895cc..0499937ee83 100644 --- a/code/datums/id_trim/jobs.dm +++ b/code/datums/id_trim/jobs.dm @@ -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