Another fix for contraband items costing like premium ones. (#12253)

This commit is contained in:
Ghom
2020-05-15 07:16:25 -07:00
committed by GitHub
parent d16c97f06b
commit 63fb4544b4
+3 -5
View File
@@ -607,9 +607,7 @@ GLOBAL_LIST_EMPTY(vending_products)
if(!R || !istype(R) || !R.product_path) if(!R || !istype(R) || !R.product_path)
vend_ready = TRUE vend_ready = TRUE
return return
var/price_to_use = default_price var/price_to_use = R.custom_price || default_price
if(R.custom_price)
price_to_use = R.custom_price
if(R in hidden_records) if(R in hidden_records)
if(!extended_inventory) if(!extended_inventory)
vend_ready = TRUE vend_ready = TRUE
@@ -636,9 +634,9 @@ GLOBAL_LIST_EMPTY(vending_products)
vend_ready = TRUE vend_ready = TRUE
return return
var/datum/bank_account/account = C.registered_account 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 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)) price_to_use = round(price_to_use * get_best_discount(C))
if(price_to_use && !account.adjust_money(-price_to_use)) if(price_to_use && !account.adjust_money(-price_to_use))
say("You do not possess the funds to purchase [R.name].") say("You do not possess the funds to purchase [R.name].")