From c390cc9ee1d4c4ca74c0fbe18f8e6e79cbd70876 Mon Sep 17 00:00:00 2001 From: Charlie Nolan Date: Mon, 11 Mar 2024 10:05:46 -0700 Subject: [PATCH] Custom food can now be renamed, as the tip indicates. (#24402) * Custom food can now be renamed, as the tip indicates. * Descriptive variable names are good. --- code/modules/food_and_drinks/food/customizables.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm index 01db2bfef50..a220223b157 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -336,6 +336,12 @@ do {\ /obj/item/food/snacks/customizable/attackby(obj/item/I, mob/user, params) + if(is_pen(I)) + var/new_name = rename_interactive(user, I, use_prefix = FALSE) + if(!isnull(new_name)) + to_chat(user, "You declare this to be \a [name]. Delicious!") + return + if(!istype(I, /obj/item/food/snacks)) to_chat(user, "[I] isn't exactly something that you would want to eat.") return