mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
Fixes runtime when baking foods that don't have reagents. (#78675)
## About The Pull Request Fixes #78672 Not all baked foods have reagents  but when it does then we can clear them and transfer reagents from the original object to the final baked product ## Changelog 🆑 fix: Aloe and other baked foods that don't have reagents can be baked again without turning to ash /🆑 --------- Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
This commit is contained in:
@@ -67,8 +67,9 @@
|
||||
var/atom/original_object = parent
|
||||
var/obj/item/plate/oven_tray/used_tray = original_object.loc
|
||||
var/atom/baked_result = new bake_result(used_tray)
|
||||
baked_result.reagents.clear_reagents()
|
||||
original_object.reagents?.trans_to(baked_result, original_object.reagents.total_volume)
|
||||
if(baked_result.reagents) //make space and tranfer reagents if it has any
|
||||
baked_result.reagents.clear_reagents()
|
||||
original_object.reagents.trans_to(baked_result, original_object.reagents.total_volume)
|
||||
|
||||
if(who_baked_us)
|
||||
ADD_TRAIT(baked_result, TRAIT_FOOD_CHEF_MADE, who_baked_us)
|
||||
|
||||
Reference in New Issue
Block a user