diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm index 35392298990..428f6c5e881 100644 --- a/code/datums/components/crafting/crafting.dm +++ b/code/datums/components/crafting/crafting.dm @@ -122,23 +122,19 @@ if(isstack(item)) var/obj/item/stack/stack = item .["other"][item.type] += stack.amount - else if(item.tool_behaviour) - .["tool_behaviour"] += item.tool_behaviour - .["other"][item.type] += 1 - else - if(is_reagent_container(item)) - var/obj/item/reagent_containers/container = item - if(container.is_drainable()) - for(var/datum/reagent/reagent in container.reagents.reagent_list) - .["other"][reagent.type] += reagent.volume + else if(is_reagent_container(item) && item.is_drainable() && length(item.reagents.reagent_list)) //some container that has some reagents inside it that can be drained + var/obj/item/reagent_containers/container = item + for(var/datum/reagent/reagent as anything in container.reagents.reagent_list) + .["other"][reagent.type] += reagent.volume + else //a reagent container that is empty can also be used as a tool. e.g. glass bottle can be used as a rolling pin + if(item.tool_behaviour) + .["tool_behaviour"] += item.tool_behaviour .["other"][item.type] += 1 else if (ismachinery(object)) LAZYADDASSOCLIST(.["machinery"], object.type, object) else if (isstructure(object)) LAZYADDASSOCLIST(.["structures"], object.type, object) - - /// Returns a boolean on whether the tool requirements of the input recipe are satisfied by the input source and surroundings. /datum/component/personal_crafting/proc/check_tools(atom/source, datum/crafting_recipe/recipe, list/surroundings) if(!length(recipe.tool_behaviors) && !length(recipe.tool_paths))