Fixes runtime when baking foods that don't have reagents. (#78675)

## About The Pull Request
Fixes #78672

Not all baked foods have reagents
![Screenshot
(313)](https://github.com/tgstation/tgstation/assets/110812394/c2b2440a-f94e-42c7-9524-7316714aef2e)

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:
SyncIt21
2023-09-30 22:29:49 +05:30
committed by GitHub
parent b80d498e76
commit 0e899b7b1d
+3 -2
View File
@@ -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)