From 14d55aba1cae7e2d0deb90ed53edf1c6df7a3643 Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Sat, 23 Mar 2024 01:24:18 -0400 Subject: [PATCH] [MIRROR] [NO GBP] Fix curators not getting a cut from patronized paintings in a better way (#1588) * [NO GBP] Fix curators not getting a cut from patronized paintings in a better way (#82159) ## About The Pull Request I'm giving all the credits of this PR to the creator of #82153. The reason I'm making this PR is because, while the other fix work too, I believe this one is perhaps better so that we won't have to call `SSjob.GetJobType(jobtype)` everytime we want to access or make use of the `bank_accounts_by_job` variable. ## Why It's Good For The Game See title, also the other PR if you want a more indepth explaination of relatively simple stuff. ## Changelog :cl: 00-Steven fix: Fixed patronizing paintings not giving a cut to the curators. /:cl: * [NO GBP] Fix curators not getting a cut from patronized paintings in a better way --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> --- code/controllers/subsystem/economy.dm | 2 +- code/modules/economy/account.dm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/controllers/subsystem/economy.dm b/code/controllers/subsystem/economy.dm index 7b3f93f5d82..79b3e2d040c 100644 --- a/code/controllers/subsystem/economy.dm +++ b/code/controllers/subsystem/economy.dm @@ -29,7 +29,7 @@ SUBSYSTEM_DEF(economy) * A list of sole account datums can be obtained with flatten_list(), another variable would be redundant rn. */ var/list/bank_accounts_by_id = list() - /// A list of bank accounts indexed by their assigned job. + /// A list of bank accounts indexed by their assigned job typepath. var/list/bank_accounts_by_job = list() ///List of the departmental budget cards in existance. var/list/dep_cards = list() diff --git a/code/modules/economy/account.dm b/code/modules/economy/account.dm index 77452c11d2b..d31e204333b 100644 --- a/code/modules/economy/account.dm +++ b/code/modules/economy/account.dm @@ -49,7 +49,7 @@ /datum/bank_account/Destroy() if(add_to_accounts) SSeconomy.bank_accounts_by_id -= "[account_id]" - SSeconomy.bank_accounts_by_job[account_job] -= src + SSeconomy.bank_accounts_by_job[account_job.type] -= src QDEL_LIST(redeemed_coupons) return ..() @@ -72,7 +72,7 @@ stack_trace("Unable to find a unique account ID, substituting currently existing account of id [account_id].") SSeconomy.bank_accounts_by_id["[account_id]"] = src if(account_job) - LAZYADD(SSeconomy.bank_accounts_by_job[account_job], src) + LAZYADD(SSeconomy.bank_accounts_by_job[account_job.type], src) /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