mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
[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:
co-authored by
GoldenAlpharex
parent
827d8446ee
commit
1fc9ff9f79
@@ -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 ..()
|
||||
|
||||
Reference in New Issue
Block a user