From 820268e1aaacd24afa8dcded12d395b13dfd9da9 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 23 Mar 2024 21:46:00 +0100 Subject: [PATCH] [MIRROR] Fixes patronising paintings when there's no curators. (#26975) * Fixes patronising paintings when there's no curators. (#82124) Fixes #82091 :cl: fix: Painting patronage works again when there's no curator present during the round. /:cl: * Fixes patronising paintings when there's no curators. --------- Co-authored-by: AnturK --- code/modules/art/paintings.dm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/code/modules/art/paintings.dm b/code/modules/art/paintings.dm index 8c85d4fc7b4..479b4c671cc 100644 --- a/code/modules/art/paintings.dm +++ b/code/modules/art/paintings.dm @@ -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