From d7749d6ff04ec2b1d006858603b65dde16fedab0 Mon Sep 17 00:00:00 2001 From: "Wowzewow (Wezzy)" <42310821+alsoandanswer@users.noreply.github.com> Date: Fri, 21 Aug 2020 04:26:26 +0800 Subject: [PATCH] Fixes condimaster to use the proper condiment_name and condiment_description variables. also makes frost oil blue (#9596) --- code/modules/reagents/Chemistry-Machinery.dm | 11 ++--- .../Chemistry-Reagents-Dispenser.dm | 2 +- .../Chemistry-Reagents-Food-Drinks.dm | 21 ++++++--- .../reagent_containers/food/condiment.dm | 37 ++++++---------- html/changelogs/wezzy_condimaster_fixes.yml | 43 +++++++++++++++++++ 5 files changed, 80 insertions(+), 34 deletions(-) create mode 100644 html/changelogs/wezzy_condimaster_fixes.yml diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 7b080699362..6a8c6ab6e4c 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -15,7 +15,7 @@ idle_power_usage = 20 layer = 2.9 clicksound = "button" - + var/beaker = null var/obj/item/storage/pill_bottle/loaded_pill_bottle = null var/mode = TRUE @@ -55,7 +55,8 @@ icon_state = "mixer1" else if(istype(B, /obj/item/storage/pill_bottle)) - + if(condi) + return if(src.loaded_pill_bottle) to_chat(user, "A pill bottle is already loaded into the machine.") return @@ -232,7 +233,7 @@ dat = "Please insert beaker.
" if(src.loaded_pill_bottle) dat += "Eject Pill Bottle \[[loaded_pill_bottle.contents.len]/[loaded_pill_bottle.max_storage_space]\]

" - else + else if(!condi) dat += "No pill bottle inserted.

" dat += "Close" else @@ -240,7 +241,7 @@ dat += "Eject beaker and Clear Buffer
" if(src.loaded_pill_bottle) dat += "Eject Pill Bottle \[[loaded_pill_bottle.contents.len]/[loaded_pill_bottle.max_storage_space]\]

" - else + else if(!condi) dat += "No pill bottle inserted.

" if(!R.total_volume) dat += "Beaker is empty." @@ -283,7 +284,7 @@ /obj/machinery/chem_master/condimaster name = "CondiMaster 3000" condi = 1 - + //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// /obj/machinery/reagentgrinder diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm index d3ed5bb4b39..99b8e21c5c3 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm @@ -516,7 +516,7 @@ glass_desc = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste." fallback_specific_heat = 0.332 - condiment_name = "sugar" + condiment_name = "sugar sack" condiment_desc = "Tasty space sugar!" condiment_icon_state = "sugar" diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm index b399bd58f66..6efc41847af 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -372,7 +372,9 @@ color = "#FFFFFF" taste_description = "chalky wheat" condiment_name = "flour sack" + condiment_desc = "A big bag of flour. Good for baking!" condiment_icon_state = "flour" + condiment_center_of_mass = list("x"=16, "y"=8) /datum/reagent/nutriment/flour/touch_turf(var/turf/simulated/T) if(!istype(T, /turf/space)) @@ -399,6 +401,7 @@ taste_description = "umami" taste_mult = 1.1 condiment_name = "soy sauce" + condiment_desc = "A salty soy-based flavoring." condiment_icon_state = "soysauce" /datum/reagent/nutriment/ketchup @@ -409,6 +412,7 @@ color = "#731008" taste_description = "ketchup" condiment_name = "ketchup" + condiment_desc = "You feel more American already." condiment_icon_state = "ketchup" condiment_center_of_mass = list("x"=16, "y"=6) @@ -420,6 +424,9 @@ color = "#FFFFFF" taste_description = "rice" taste_mult = 0.4 + condiment_name = "rice sack" + condiment_icon_state = "rice" + condiment_center_of_mass = list("x"=16, "y"=8) /datum/reagent/nutriment/cherryjelly name = "Cherry Jelly" @@ -489,6 +496,7 @@ nutriment_factor = 4 color = "#d8c045" condiment_name = "garlic sauce" + condiment_desc = "Perfect for repelling vampires and/or potential dates." /* Non-food stuff like condiments */ @@ -500,6 +508,7 @@ overdose = REAGENTS_OVERDOSE taste_description = "salt" condiment_name = "salt shaker" + condiment_desc = "Salt. From space oceans, presumably." condiment_icon_state = "saltshakersmall" condiment_center_of_mass = list("x"=17, "y"=11) @@ -514,18 +523,19 @@ /datum/reagent/blackpepper name = "Black Pepper" - description = "Often used to flavor food or make people sneeze." + description = "A powder ground from peppercorns. *AAAACHOOO*" reagent_state = SOLID color = "#000000" taste_description = "pepper" fallback_specific_heat = 1.25 condiment_name = "pepper mill" + condiment_desc = "Often used to flavor food or make people sneeze." condiment_icon_state = "peppermillsmall" condiment_center_of_mass = list("x"=17, "y"=11) /datum/reagent/enzyme name = "Universal Enzyme" - description = "A universal enzyme used in the preperation of certain chemicals and foods." + description = "A universal enzyme used in the preparation of certain chemicals and foods." reagent_state = LIQUID color = "#365E30" overdose = REAGENTS_OVERDOSE @@ -539,7 +549,7 @@ name = "Frost Oil" description = "A special oil that chemically chills the body. Extracted from Ice Peppers." reagent_state = LIQUID - color = "#B31008" + color = "#005BCC" taste_description = "mint" taste_mult = 1.5 @@ -4313,11 +4323,12 @@ /datum/reagent/diona_powder name = "Dionae Powder" - description = "Powdered Dionae ambergris to add that extra pazazz to any dish." + description = "Powdered Dionae ambergris." reagent_state = SOLID color = "#e08702" taste_description = "diona delicacy" fallback_specific_heat = 2 condiment_name = "bottle of dionae powder" + condiment_desc = "A vegetarian friendly way to add a little extra pizazz to any dish." condiment_icon_state = "dionaepowder" - condiment_center_of_mass = list("x"=16, "y"=10) \ No newline at end of file + condiment_center_of_mass = list("x"=16, "y"=10) diff --git a/code/modules/reagents/reagent_containers/food/condiment.dm b/code/modules/reagents/reagent_containers/food/condiment.dm index c1fe777015b..4c15e20d6e0 100644 --- a/code/modules/reagents/reagent_containers/food/condiment.dm +++ b/code/modules/reagents/reagent_containers/food/condiment.dm @@ -47,8 +47,10 @@ return var/datum/reagent/master = reagents.get_master_reagent() - name = master.condiment_name || (reagents.reagent_list.len == 1) ? "[master.name] bottle" : "condiment bottle" - desc = master.condiment_desc || (reagents.reagent_list.len == 1) ? master.description : "A mixture of various condiments. [reagents.get_master_reagent_name()] is one of them." + name = master.condiment_name || (reagents.reagent_list.len == 1) ? "master.condiment_name" : "condiment bottle" + // if no condiment_name, use generic bottle. master reagent names aren't used, because their capitalization doesn't play nice with grammar. + desc = master.condiment_desc ? "master.condiment_desc" : master.condiment_name ? "master.description" : (reagents.reagent_list.len == 1) ? "Looks like it is [reagents.get_master_reagent_name()], but you are not sure." : "A mixture of various condiments. [reagents.get_master_reagent_name()] is one of them." + // usually uses condiment_desc. if no condiment_desc, but there's a condiment_name, use reagent name as an interim. else use the generic bottle description. icon_state = master.condiment_icon_state || "mixedcondiments" center_of_mass = master.condiment_center_of_mass || list("x"=16, "y"=6) @@ -62,6 +64,8 @@ /obj/item/reagent_containers/food/condiment/shaker name = "shaker" + volume = 20 + fixed_state = TRUE center_of_mass = list("x"=17, "y"=11) amount_per_transfer_from_this = 1 fixed_state = TRUE @@ -74,40 +78,27 @@ shake(user) /obj/item/reagent_containers/food/condiment/shaker/salt - volume = 20 - fixed_state = TRUE reagents_to_add = list(/datum/reagent/sodiumchloride = 20) /obj/item/reagent_containers/food/condiment/shaker/peppermill - volume = 20 reagents_to_add = list(/datum/reagent/blackpepper = 20) /obj/item/reagent_containers/food/condiment/shaker/diona - volume = 20 reagents_to_add = list(/datum/reagent/diona_powder = 20) -/obj/item/reagent_containers/food/condiment/flour - name = "flour sack" - desc = "A big bag of flour. Good for baking!" - icon = 'icons/obj/food.dmi' - icon_state = "flour" - item_state = "flour" - center_of_mass = list("x"=16, "y"=8) - volume = 220 - fixed_state = TRUE - reagents_to_add = list(/datum/reagent/nutriment/flour = 200) - -/obj/item/reagent_containers/food/condiment/flour/Initialize() - . = ..() - randpixel_xy() - /obj/item/reagent_containers/food/condiment/shaker/spacespice icon_state = "spacespicebottle" volume = 40 reagents_to_add = list(/datum/reagent/spacespice = 40) +/obj/item/reagent_containers/food/condiment/flour + icon_state = "flour" + center_of_mass = list("x"=16, "y"=8) + volume = 220 + fixed_state = TRUE + reagents_to_add = list(/datum/reagent/nutriment/flour = 200) + /obj/item/reagent_containers/food/condiment/barbecue - icon_state = "barbecue" fixed_state = TRUE reagents_to_add = list(/datum/reagent/nutriment/barbecue = 20) @@ -117,4 +108,4 @@ /obj/item/reagent_containers/food/condiment/pacid name = "culinary acid" - reagents_to_add = list(/datum/reagent/acid/polyacid = 50) \ No newline at end of file + reagents_to_add = list(/datum/reagent/acid/polyacid = 50) diff --git a/html/changelogs/wezzy_condimaster_fixes.yml b/html/changelogs/wezzy_condimaster_fixes.yml new file mode 100644 index 00000000000..463259d835f --- /dev/null +++ b/html/changelogs/wezzy_condimaster_fixes.yml @@ -0,0 +1,43 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Wowzewow (Wezzy) + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Fixes condi-master not properly using container names for certain reagents. Rejoice, for your flour sacks are no longer called flour bottles." + - bugfix: "Coldsauce is blue now." + - bugfix: "You can no longer stuff pill bottles in the condi-master. Doesn't matter, since you couldn't make pills in the first place."