From 63fb4544b4cd2faa40891703b9a9ea8770a019e4 Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Fri, 15 May 2020 16:16:25 +0200 Subject: [PATCH] Another fix for contraband items costing like premium ones. (#12253) --- code/modules/vending/_vending.dm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index ebc5f54017..6e6636cd62 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -607,9 +607,7 @@ GLOBAL_LIST_EMPTY(vending_products) if(!R || !istype(R) || !R.product_path) vend_ready = TRUE return - var/price_to_use = default_price - if(R.custom_price) - price_to_use = R.custom_price + var/price_to_use = R.custom_price || default_price if(R in hidden_records) if(!extended_inventory) vend_ready = TRUE @@ -636,9 +634,9 @@ GLOBAL_LIST_EMPTY(vending_products) vend_ready = TRUE return var/datum/bank_account/account = C.registered_account - if(coin_records.Find(R) || hidden_records.Find(R)) + if(coin_records.Find(R)) price_to_use = R.custom_premium_price || extra_price - else + else if(!hidden_records.Find(R)) price_to_use = round(price_to_use * get_best_discount(C)) if(price_to_use && !account.adjust_money(-price_to_use)) say("You do not possess the funds to purchase [R.name].")