Bad food has bad food reagent again (#78747)

still on break so i didn't think too hard about this one

## About The Pull Request

Prevents food interactions from clearing the resulting food's reagents
if the result is a bad recipe.

Blackbox logging is also iffy here, some of them log it even if the
resulting food is a burned mess, some don't. It's weird!

## Why It's Good For The Game

Fixes #78400
<details><summary>Makes one car moth happy</summary>

![no habla
espanol](https://github.com/tgstation/tgstation/assets/75863639/a3f26acb-3a7c-44a6-a4de-2b67e4d56230)

</details> 
Did you know the appendix has bad_food reagent in it?


https://github.com/tgstation/tgstation/blob/699d09ca33e807f9100689c3ab5fbec3916186ee/code/modules/surgery/organs/internal/appendix/_appendix.dm#L5-L15

## Changelog

🆑
fix: fixed bad food not having bad food reagents
/🆑
This commit is contained in:
Sealed101
2023-10-06 13:30:15 +01:00
committed by GitHub
parent 0359da29bc
commit 9e4948148d
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -67,7 +67,7 @@
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)
if(baked_result.reagents) //make space and tranfer reagents if it has any
if(baked_result.reagents && positive_result) //make space and tranfer reagents if it has any & the resulting item isn't bad food or other bad baking result
baked_result.reagents.clear_reagents()
original_object.reagents.trans_to(baked_result, original_object.reagents.total_volume)