diff --git a/code/__HELPERS/names.dm b/code/__HELPERS/names.dm index 68742c98ad7..ff85451dd11 100644 --- a/code/__HELPERS/names.dm +++ b/code/__HELPERS/names.dm @@ -227,3 +227,51 @@ GLOBAL_DATUM(syndicate_code_response_regex, /regex) /proc/odd_organ_name() return "[pick(GLOB.gross_adjectives)], [pick(GLOB.gross_adjectives)] organ" + +/** + * returns an ic name of the tool needed + * Arguments: + * * tool_behaviour: the tool described! + */ +/proc/tool_behaviour_name(tool_behaviour) + switch(tool_behaviour) + if(TOOL_CROWBAR) + return "a crowbar" + if(TOOL_MULTITOOL) + return "a multitool" + if(TOOL_SCREWDRIVER) + return "a screwdriver" + if(TOOL_WIRECUTTER) + return "a pair of wirecutters" + if(TOOL_WRENCH) + return "a wrench" + if(TOOL_WELDER) + return "a welder" + if(TOOL_ANALYZER) + return "an analyzer tool" + if(TOOL_MINING) + return "a mining implement" + if(TOOL_SHOVEL) + return "a digging tool" + if(TOOL_RETRACTOR) + return "a retractor" + if(TOOL_HEMOSTAT) + return "something to clamp bleeding" + if(TOOL_CAUTERY) + return "a cautery" + if(TOOL_DRILL) + return "a drilling tool" + if(TOOL_SCALPEL) + return "a fine cutting tool" + if(TOOL_SAW) + return "a saw" + if(TOOL_BONESET) + return "a bone setter" + if(TOOL_KNIFE) + return "a cutting tool" + if(TOOL_BLOODFILTER) + return "a blood filter" + if(TOOL_ROLLINGPIN) + return "a rolling pin" + else + return "something... but the gods didn't set this up right (Please report this bug)" diff --git a/code/datums/components/food/edible.dm b/code/datums/components/food/edible.dm index 0558bdd5f7f..cbaec4f1770 100644 --- a/code/datums/components/food/edible.dm +++ b/code/datums/components/food/edible.dm @@ -43,7 +43,7 @@ Behavior that's still missing from this component that original food items had t ///The flavortext for taste (haha get it flavor text) var/list/tastes ///The type of atom this creates when the object is microwaved. - var/microwaved_type + var/atom/microwaved_type /datum/component/edible/Initialize(list/initial_reagents, food_flags = NONE, @@ -139,6 +139,9 @@ Behavior that's still missing from this component that original food items had t /datum/component/edible/proc/examine(datum/source, mob/user, list/examine_list) SIGNAL_HANDLER + if(microwaved_type) + examine_list += "[parent] could be microwaved into [initial(microwaved_type.name)]!" + if(!(food_flags & FOOD_IN_CONTAINER)) switch (bitecount) if (0) diff --git a/code/datums/components/grillable.dm b/code/datums/components/grillable.dm index 0ad66639002..6ef1bff7186 100644 --- a/code/datums/components/grillable.dm +++ b/code/datums/components/grillable.dm @@ -81,7 +81,10 @@ ///Ran when an object almost finishes grilling /datum/component/grillable/proc/OnExamine(atom/A, mob/user, list/examine_list) SIGNAL_HANDLER + if(!current_cook_time) //Not grilled yet + if(positive_result) + examine_list += "[parent] can be grilled into \a [initial(cook_result.name)]." return if(positive_result) diff --git a/code/datums/elements/food/processable.dm b/code/datums/elements/food/processable.dm index 4c92b308a3c..aab0223e63c 100644 --- a/code/datums/elements/food/processable.dm +++ b/code/datums/elements/food/processable.dm @@ -3,7 +3,7 @@ element_flags = ELEMENT_BESPOKE id_arg_index = 2 ///The type of atom this creates when the processing recipe is used. - var/result_atom_type + var/atom/result_atom_type ///The tool behaviour for this processing recipe var/tool_behaviour ///Time to process the atom @@ -22,13 +22,23 @@ src.result_atom_type = result_atom_type RegisterSignal(target, COMSIG_ATOM_TOOL_ACT(tool_behaviour), .proc/try_process) + RegisterSignal(target, COMSIG_PARENT_EXAMINE, .proc/OnExamine) /datum/element/processable/Detach(datum/target) . = ..() - UnregisterSignal(target, COMSIG_ATOM_TOOL_ACT(tool_behaviour)) + UnregisterSignal(target, list(COMSIG_ATOM_TOOL_ACT(tool_behaviour), COMSIG_PARENT_EXAMINE)) /datum/element/processable/proc/try_process(datum/source, mob/living/user, obj/item/I, list/mutable_recipes) SIGNAL_HANDLER mutable_recipes += list(list(TOOL_PROCESSING_RESULT = result_atom_type, TOOL_PROCESSING_AMOUNT = amount_created, TOOL_PROCESSING_TIME = time_to_process)) return COMPONENT_NO_AFTERATTACK + +///So people know what the frick they're doing without reading from a wiki page (I mean they will inevitably but i'm trying to help, ok?) +/datum/element/processable/proc/OnExamine(atom/source, mob/user, list/examine_list) + SIGNAL_HANDLER + + if(amount_created > 1) + examine_list += "It can be turned into [amount_created] [initial(result_atom_type.name)]s with [tool_behaviour_name(tool_behaviour)]!" + else + examine_list += "It can be turned into \a [initial(result_atom_type.name)] with [tool_behaviour_name(tool_behaviour)]!" diff --git a/code/modules/food_and_drinks/food/condiment.dm b/code/modules/food_and_drinks/food/condiment.dm index c5317ca1950..71d9af72952 100644 --- a/code/modules/food_and_drinks/food/condiment.dm +++ b/code/modules/food_and_drinks/food/condiment.dm @@ -101,6 +101,14 @@ list_reagents = list(/datum/reagent/consumable/enzyme = 50) fill_icon_thresholds = null +/obj/item/reagent_containers/food/condiment/enzyme/examine(mob/user) + . = ..() + var/datum/chemical_reaction/recipe = GLOB.chemical_reactions_list[/datum/chemical_reaction/food/cheesewheel] + var/milk_required = recipe.required_reagents[/datum/reagent/consumable/milk] + var/enzyme_required = recipe.required_catalysts[/datum/reagent/consumable/enzyme] + . += "[milk_required] milk, [enzyme_required] enzyme and you got cheese." + . += "Remember, the enzyme isn't used up, so return it to the bottle, dingus!" + /obj/item/reagent_containers/food/condiment/sugar name = "sugar sack" desc = "Tasty spacey sugar!" @@ -111,6 +119,14 @@ list_reagents = list(/datum/reagent/consumable/sugar = 50) fill_icon_thresholds = null +/obj/item/reagent_containers/food/condiment/sugar/examine(mob/user) + . = ..() + var/datum/chemical_reaction/recipe = GLOB.chemical_reactions_list[/datum/chemical_reaction/food/cakebatter] + var/flour_required = recipe.required_reagents[/datum/reagent/consumable/flour] + var/eggyolk_required = recipe.required_reagents[/datum/reagent/consumable/eggyolk] + var/sugar_required = recipe.required_reagents[/datum/reagent/consumable/sugar] + . += "[flour_required] flour, [eggyolk_required] egg yolk (or soy milk), [sugar_required] sugar makes cake dough. You can make pie dough from it." + /obj/item/reagent_containers/food/condiment/saltshaker //Separate from above since it's a small shaker rather then name = "salt shaker" // a large one. desc = "Salt. From space oceans, presumably." @@ -167,6 +183,14 @@ list_reagents = list(/datum/reagent/consumable/milk = 50) fill_icon_thresholds = null +/obj/item/reagent_containers/food/condiment/milk/examine(mob/user) + . = ..() + var/datum/chemical_reaction/recipe = GLOB.chemical_reactions_list[/datum/chemical_reaction/food/cheesewheel] + var/milk_required = recipe.required_reagents[/datum/reagent/consumable/milk] + var/enzyme_required = recipe.required_catalysts[/datum/reagent/consumable/enzyme] + . += "[milk_required] milk, [enzyme_required] enzyme and you got cheese." + . += "Remember, the enzyme isn't used up, so return it to the bottle, dingus!" + /obj/item/reagent_containers/food/condiment/flour name = "flour sack" desc = "A big bag of flour. Good for baking!" @@ -177,6 +201,19 @@ list_reagents = list(/datum/reagent/consumable/flour = 30) fill_icon_thresholds = null +/obj/item/reagent_containers/food/condiment/flour/examine(mob/user) + . = ..() + var/datum/chemical_reaction/recipe_dough = GLOB.chemical_reactions_list[/datum/chemical_reaction/food/dough] + var/datum/chemical_reaction/recipe_cakebatter = GLOB.chemical_reactions_list[/datum/chemical_reaction/food/cakebatter] + var/dough_flour_required = recipe_dough.required_reagents[/datum/reagent/consumable/flour] + var/dough_water_required = recipe_dough.required_reagents[/datum/reagent/water] + var/cakebatter_flour_required = recipe_cakebatter.required_reagents[/datum/reagent/consumable/flour] + var/cakebatter_eggyolk_required = recipe_cakebatter.required_reagents[/datum/reagent/consumable/eggyolk] + var/cakebatter_sugar_required = recipe_cakebatter.required_reagents[/datum/reagent/consumable/sugar] + . += "You retreat inward and recall the teachings of... Making Dough..." + . += "[dough_flour_required] flour, [dough_water_required] water makes normal dough. You can make flat dough from it." + . += "[cakebatter_flour_required] flour, [cakebatter_eggyolk_required] egg yolk (or soy milk), [cakebatter_sugar_required] sugar makes cake dough. You can make pie dough from it." + /obj/item/reagent_containers/food/condiment/soymilk name = "soy milk" desc = "It's soy milk. White and nutritious goodness!"