mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
Fixes an oversight with bank accounts (#86850)
## About The Pull Request Fixes this runtime:  `account_job` can in fact be null it seems, and that should be taken into account. ## Why It's Good For The Game Fixes oversight ## Changelog Nothing player facing (probably?)
This commit is contained in:
@@ -410,7 +410,7 @@ SUBSYSTEM_DEF(id_access)
|
|||||||
id_card.assignment = trim.assignment
|
id_card.assignment = trim.assignment
|
||||||
|
|
||||||
var/datum/job/trim_job = trim.find_job()
|
var/datum/job/trim_job = trim.find_job()
|
||||||
if (!isnull(trim_job) && !isnull(id_card.registered_account))
|
if (!isnull(id_card.registered_account))
|
||||||
var/datum/job/old_job = id_card.registered_account.account_job
|
var/datum/job/old_job = id_card.registered_account.account_job
|
||||||
id_card.registered_account.account_job = trim_job
|
id_card.registered_account.account_job = trim_job
|
||||||
id_card.registered_account.update_account_job_lists(trim_job, old_job)
|
id_card.registered_account.update_account_job_lists(trim_job, old_job)
|
||||||
|
|||||||
@@ -83,7 +83,8 @@
|
|||||||
|
|
||||||
if(old_job)
|
if(old_job)
|
||||||
SSeconomy.bank_accounts_by_job[old_job.type] -= src
|
SSeconomy.bank_accounts_by_job[old_job.type] -= src
|
||||||
LAZYADD(SSeconomy.bank_accounts_by_job[new_job.type], src)
|
if(new_job)
|
||||||
|
LAZYADD(SSeconomy.bank_accounts_by_job[new_job.type], src)
|
||||||
|
|
||||||
/datum/bank_account/vv_edit_var(var_name, var_value) // just so you don't have to do it manually
|
/datum/bank_account/vv_edit_var(var_name, var_value) // just so you don't have to do it manually
|
||||||
var/old_id = account_id
|
var/old_id = account_id
|
||||||
|
|||||||
Reference in New Issue
Block a user