From 1fc9ff9f79276addb552bbb3ca90cadfc33a42d1 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 11 Aug 2022 12:36:00 +0200 Subject: [PATCH] [MIRROR] Fixes an oversight in food exports [MDB IGNORE] (#15541) * Fixes an oversight in food exports (#69106) * Fixes an oversight in food exports Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> --- code/modules/cargo/exports/food_and_drink.dm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/modules/cargo/exports/food_and_drink.dm b/code/modules/cargo/exports/food_and_drink.dm index a1ee29fa73a..d4b3b559097 100644 --- a/code/modules/cargo/exports/food_and_drink.dm +++ b/code/modules/cargo/exports/food_and_drink.dm @@ -9,9 +9,16 @@ export_types = list(/obj/item/food) include_subtypes = TRUE exclude_types = list(/obj/item/food/grown) + /// Have we already set the cost of this export? Necessary to avoid the cost being constantly reset. + var/cost_obtained_from_venue_value = FALSE /datum/export/food/get_cost(obj/object, allowed_categories, apply_elastic) var/obj/item/food/sold_food = object if(sold_food.food_flags & FOOD_SILVER_SPAWNED) return FOOD_PRICE_WORTHLESS - return sold_food.venue_value + + if(!cost_obtained_from_venue_value) + cost = sold_food.venue_value + cost_obtained_from_venue_value = TRUE + + return ..()