Merge pull request #14067 from VOREStation/upstream-merge-8817

[MIRROR] Naming Food & Blood Cakes
This commit is contained in:
Heroman3003
2022-12-04 07:17:44 +10:00
committed by CHOMPStation2
parent a076afbee3
commit 151e5fdb91
2 changed files with 30 additions and 1 deletions

View File

@@ -489,6 +489,10 @@
var/list/cooktypes = list()
var/datum/reagents/buffer = new /datum/reagents(1000)
var/totalcolour
var/reagents_determine_color
if(!LAZYLEN(CI.container.contents)) // It's possible to make something, such as a cake in the oven, with only reagents. This stops them from being grey and sad.
reagents_determine_color = TRUE
for (var/obj/item/I in CI.container)
var/obj/item/weapon/reagent_containers/food/snacks/S
@@ -527,6 +531,13 @@
buffer.trans_to_holder(result.reagents, buffer.total_volume) //trans_to doesn't handle food items well, so
//just call trans_to_holder instead
// Reagent-only foods.
if(reagents_determine_color)
totalcolour = result.reagents.get_color()
for(var/datum/reagent/reag in result.reagents.reagent_list)
words |= text2list(reag.name, " ")
//Filling overlay
var/image/I = image(result.icon, "[result.icon_state]_filling")
I.color = totalcolour