From b66c700a638b4e7fc5085ffd97d478306d3085f2 Mon Sep 17 00:00:00 2001 From: Citinited Date: Sat, 14 Apr 2018 16:40:25 +0100 Subject: [PATCH] tigercat & falseincarnate code suggestions --- code/_globalvars/lists/fortunes.dm | 4 ++-- code/modules/food_and_drinks/food/snacks.dm | 2 +- code/modules/food_and_drinks/recipes/recipes_oven.dm | 7 +++---- code/modules/paperwork/paper.dm | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/code/_globalvars/lists/fortunes.dm b/code/_globalvars/lists/fortunes.dm index 0ccf794d6b0..409f7d10392 100644 --- a/code/_globalvars/lists/fortunes.dm +++ b/code/_globalvars/lists/fortunes.dm @@ -1,4 +1,4 @@ -var/global/list/fortune_cookie_messages = list("A woman named [pick(first_names_female)] may have an opportunity for you.", +GLOBAL_LIST_INIT(fortune_cookie_messages, list("A woman named [pick(first_names_female)] may have an opportunity for you.", "A man named [pick(first_names_male)] may have an opportunity for you.", "If you feel you are right, stand firmly by your convictions.", "A stranger is a friend you have not spoken to yet.", @@ -18,4 +18,4 @@ var/global/list/fortune_cookie_messages = list("A woman named [pick(first_names_ "A chance meeting opens new doors to success and friendship.", "The greatest danger could be your stupidity.", "He who laughs at himself never runs out of things to laugh at.", -"Help! I'm being held prisoner in a Nanotrasen bakery!") +"Help! I'm being held prisoner in a Nanotrasen bakery!")) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 049f78fa5f9..0e5009a1225 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -1054,7 +1054,7 @@ icon_state = "fortune_cookie" filling_color = "#E8E79E" list_reagents = list("nutriment" = 3) - trash = /obj/item/weapon/paper + trash = /obj/item/weapon/paper/fortune /obj/item/weapon/reagent_containers/food/snacks/badrecipe name = "Burned mess" diff --git a/code/modules/food_and_drinks/recipes/recipes_oven.dm b/code/modules/food_and_drinks/recipes/recipes_oven.dm index 2fcb2eb95a0..95dfa1c77dd 100644 --- a/code/modules/food_and_drinks/recipes/recipes_oven.dm +++ b/code/modules/food_and_drinks/recipes/recipes_oven.dm @@ -181,12 +181,11 @@ /datum/recipe/oven/fortunecookie/make_food(obj/container) var/obj/item/weapon/paper/P = locate() in container + P.loc = null //So we don't delete the paper while cooking the cookie var/obj/item/weapon/reagent_containers/food/snacks/fortunecookie/being_cooked = ..() - if(P.info) - P.loc = being_cooked //Prevents the oven deleting our paper + if(P.info) //If there's anything written on the paper, just move it into the fortune cookie + P.forceMove(being_cooked) //Prevents the oven deleting our paper being_cooked.trash = P //so the paper is left behind as trash without special-snowflake(TM Nodrak) code ~carn - else - being_cooked.trash = new /obj/item/weapon/paper/fortune(being_cooked) return being_cooked /datum/recipe/oven/pizzamargherita diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 446718986f2..b15c5bc7fe2 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -486,7 +486,7 @@ /obj/item/weapon/paper/fortune/New() ..() - var/fortunemessage = pick(fortune_cookie_messages) + var/fortunemessage = pick(GLOB.fortune_cookie_messages) info = "

[fortunemessage]

" info += "Lucky numbers: [rand(1,49)], [rand(1,49)], [rand(1,49)], [rand(1,49)], [rand(1,49)]"