[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>
This commit is contained in:
SkyratBot
2022-08-11 06:36:00 -04:00
committed by GitHub
co-authored by GoldenAlpharex
parent 827d8446ee
commit 1fc9ff9f79
+8 -1
View File
@@ -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 ..()