diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 04f48b1cae9..f0854441bd3 100755 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -350,7 +350,7 @@ /obj/item/reagent_containers/glass/mortar name = "mortar" - desc = "A specially formed bowl of ancient design. It is possible to crush or juice items placed in it using a pestle; however the process, unlike modern methods, is slow and physically exhausting. Alt click to eject the item." + desc = "A specially formed bowl of ancient design. It is possible to crush or juice items placed in it using a pestle; however the process, unlike modern methods, is slow and physically exhausting. Alt click to eject the item." icon_state = "mortar" amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5, 10, 15, 20, 25, 30, 50, 100) @@ -373,22 +373,47 @@ if(user.getStaminaLoss() > 50) to_chat(user, span_warning("You are too tired to work!")) return - to_chat(user, span_notice("You start grinding...")) - if((do_after(user, 25, target = src)) && grinded) - user.adjustStaminaLoss(40) - if(grinded.juice_results) //prioritize juicing - grinded.on_juice() - reagents.add_reagent_list(grinded.juice_results) - to_chat(user, span_notice("You juice [grinded] into a fine liquid.")) - QDEL_NULL(grinded) - return - grinded.on_grind() - reagents.add_reagent_list(grinded.grind_results) - if(grinded.reagents) //food and pills - grinded.reagents.trans_to(src, grinded.reagents.total_volume, transfered_by = user) - to_chat(user, span_notice("You break [grinded] into powder.")) - QDEL_NULL(grinded) - return + var/list/choose_options = list( + "Grind" = image(icon = 'icons/hud/radial.dmi', icon_state = "radial_grind"), + "Juice" = image(icon = 'icons/hud/radial.dmi', icon_state = "radial_juice") + ) + var/picked_option = show_radial_menu(user, src, choose_options, radius = 38, require_near = TRUE) + if(grinded && in_range(src, user) && user.is_holding(I) && picked_option) + to_chat(user, span_notice("You start grinding...")) + if(do_after(user, 25, target = src)) + user.adjustStaminaLoss(40) + switch(picked_option) + if("Juice") //prioritize juicing + if(grinded.juice_results) + grinded.on_juice() + reagents.add_reagent_list(grinded.juice_results) + to_chat(user, span_notice("You juice [grinded] into a fine liquid.")) + QDEL_NULL(grinded) + return + else + grinded.on_grind() + reagents.add_reagent_list(grinded.grind_results) + grinded.reagents.trans_to(src, grinded.reagents.total_volume, transfered_by = user) + to_chat(user, span_notice("You try to juice [grinded] but there is no liquids in it. Instead you get nice powder.")) + QDEL_NULL(grinded) + return + if("Grind") + if(grinded.grind_results) + grinded.on_grind() + reagents.add_reagent_list(grinded.grind_results) + grinded.reagents.trans_to(src, grinded.reagents.total_volume, transfered_by = user) + to_chat(user, span_notice("You break [grinded] into powder.")) + QDEL_NULL(grinded) + return + else + grinded.on_juice() + reagents.add_reagent_list(grinded.juice_results) + to_chat(user, span_notice("You try to grind [grinded] but it almost instantly turns into a fine liquid.")) + QDEL_NULL(grinded) + return + else + to_chat(user, span_notice("You try to grind the mortar itself instead of [grinded]. You failed.")) + return return else to_chat(user, span_warning("There is nothing to grind!"))