From b07589a93322b53caebcea25a7bc024db73ae915 Mon Sep 17 00:00:00 2001 From: ExcessiveUseOfCobblestone Date: Mon, 5 Dec 2016 16:35:44 -0500 Subject: [PATCH] Special SnowFood [Food Feature + Food-Related fixes] (#21935) * Fixes Food Renaming and sorts * wew * Pkp + Remie Review --- code/game/objects/items/weapons/weaponry.dm | 7 ++++--- code/modules/food_and_drinks/food/customizables.dm | 13 +------------ code/modules/food_and_drinks/food/snacks.dm | 1 + 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index 3c84b091006..7a914e13573 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -19,11 +19,12 @@ ..() /obj/item/weapon/proc/rename_weapon(mob/M) - var/input = stripped_input(M,"What do you want to name the weapon?", ,"", MAX_NAME_LEN) + var/oldname = name + var/input = stripped_input(M,"What do you want to name /the [name]?", ,"", MAX_NAME_LEN) if(!qdeleted(src) && M.canUseTopic(src, BE_CLOSE) && input != "") name = input - M << "You name the weapon [input]. Say hello to your new friend." + M << "/The [oldname] has successfully been renamed to /the [input]." return else return @@ -33,7 +34,7 @@ if(!qdeleted(src) && M.canUseTopic(src, BE_CLOSE) && input != "") desc = input - M << "You have successfully changed the object's description." + M << "You have successfully changed /the [name]'s description." return else return diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm index 2ab5449546b..62b6e86d9e4 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -15,6 +15,7 @@ bitesize = 4 w_class = WEIGHT_CLASS_SMALL volume = 80 + unique_rename = 1 var/ingMax = 12 var/list/ingredients = list() @@ -56,18 +57,6 @@ update_overlays(S) user << "You add the [I.name] to the [name]." update_name(S) - else if(istype(I, /obj/item/weapon/pen)) - var/txt = stripped_input(user, "What would you like the food to be called?", "Food Naming", "", 30) - if(txt) - ingMax = ingredients.len - user << "You add a last touch to the dish by renaming it." - customname = txt - if(istype(src, /obj/item/weapon/reagent_containers/food/snacks/customizable/sandwich)) - var/obj/item/weapon/reagent_containers/food/snacks/customizable/sandwich/S = src - if(S.finished) - name = "[customname] sandwich" - return - name = "[customname] [initial(name)]" else . = ..() diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 020cd6b48cc..3cc396443df 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -3,6 +3,7 @@ desc = "Yummy." icon = 'icons/obj/food/food.dmi' icon_state = null + unique_rename = 1 var/bitesize = 2 var/bitecount = 0 var/trash = null