Skip to content

Commit

Permalink
[MIRROR] Fixes patronising paintings when there's no curators. (#1564)
Browse files Browse the repository at this point in the history
* Fixes patronising paintings when there's no curators. (#82124)

Fixes #82091

🆑
fix: Painting patronage works again when there's no curator present
during the round.
/🆑

* Fixes patronising paintings when there's no curators.

---------

Co-authored-by: AnturK <[email protected]>
  • Loading branch information
2 people authored and StealsThePRs committed Mar 22, 2024
1 parent 9aba8d1 commit d15c502
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions code/modules/art/paintings.dm
Original file line number Diff line number Diff line change
Expand Up @@ -276,14 +276,15 @@
var/datum/bank_account/service_account = SSeconomy.get_dep_account(ACCOUNT_SRV)
service_account.adjust_money(offer_amount * SERVICE_PERCENTILE_CUT)
///We give the curator(s) a cut (unless they're themselves the patron), as it's their job to curate and promote art among other things.
var/list/curator_accounts = SSeconomy.bank_accounts_by_job[/datum/job/curator] - account
var/curators_length = length(curator_accounts)
if(curators_length)
var/curator_cut = round(offer_amount * CURATOR_PERCENTILE_CUT / curators_length)
if(curator_cut)
for(var/datum/bank_account/curator as anything in curator_accounts)
curator.adjust_money(curator_cut, "Painting: Patronage cut")
curator.bank_card_talk("Cut on patronage received, account now holds [curator.account_balance] cr.")
if(SSeconomy.bank_accounts_by_job[/datum/job/curator])
var/list/curator_accounts = SSeconomy.bank_accounts_by_job[/datum/job/curator] - account
var/curators_length = length(curator_accounts)
if(curators_length)
var/curator_cut = round(offer_amount * CURATOR_PERCENTILE_CUT / curators_length)
if(curator_cut)
for(var/datum/bank_account/curator as anything in curator_accounts)
curator.adjust_money(curator_cut, "Painting: Patronage cut")
curator.bank_card_talk("Cut on patronage received, account now holds [curator.account_balance] cr.")

painting_metadata.patron_ckey = user.ckey
painting_metadata.patron_name = user.real_name
Expand Down

0 comments on commit d15c502

Please sign in to comment.