mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[MIRROR] [NO GBP] Fix curators not getting a cut from patronized paintings in a better way (#26996)
* [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 🆑 00-Steven fix: Fixed patronizing paintings not giving a cut to the curators. /🆑 * [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>
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user