From 9bdd3495af89aa2dd81888f4af54743f7026ca9d Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Fri, 10 Mar 2017 18:25:10 -0500 Subject: [PATCH 1/4] "Recipe Dump" admin verb The idea of updating the wiki list of recipes is daunting, especially getting all the icons and resizing them to look nice on a webpage, so fuuuuuuuuck that. I made a verb that does it. It dumps upsized (64x64) images of every food icon and a recipes.html file into your cache with a table that contains all the recipes, nicely formatted, in alphabetical order (the -burger and -kebab at the top are because those are [whatever-meat]-burger and [whatever-meat]-kebab). Then you can just throw them on a website. It will include a recipes.css file if it's in the same dir. Here's the result on our server: https://vore-station.net/infodump/recipes.html --- code/modules/admin/admin_verbs.dm | 3 +- code/modules/food/recipe_dump.dm | 129 ++++++++++++++++++++++++++++++ vorestation.dme | 1 + 3 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 code/modules/food/recipe_dump.dm diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index b3473f62f77..d1689b55cb8 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -162,7 +162,8 @@ var/list/admin_verbs_server = list( /client/proc/toggle_random_events, /client/proc/check_customitem_activity, /client/proc/nanomapgen_DumpImage, - /client/proc/modify_server_news + /client/proc/modify_server_news, + /client/proc/recipe_dump ) var/list/admin_verbs_debug = list( /client/proc/getruntimelog, //allows us to access runtime logs to somebody, diff --git a/code/modules/food/recipe_dump.dm b/code/modules/food/recipe_dump.dm new file mode 100644 index 00000000000..f33be272589 --- /dev/null +++ b/code/modules/food/recipe_dump.dm @@ -0,0 +1,129 @@ +/client/proc/recipe_dump() + set name = "Generate Recipe Dump" + set category = "Server" + set desc = "Dumps food recipe info and images for wiki or other use." + + if(!holder) + return + + var/list/recipe_paths = typesof(/datum/recipe) - /datum/recipe + //Build a useful list + for(var/Rp in recipe_paths) + //Lists don't work with datum-stealing no-instance initial() so we have to. + var/datum/recipe/R = new Rp() + var/obj/res = new R.result() + + var/icon/result_icon = icon(res.icon,res.icon_state) + result_icon.Scale(64,64) + + recipe_paths[Rp] = list( + "Result" = "[res.name]", + "Reagents" = R.reagents, + "Fruit" = R.fruit, + "Ingredients" = R.items, + "Image" = result_icon + ) + + qdel(res) + qdel(R) + + //Items needs further processing into human-readability. Another use of initial. + var/working_ing_list = list() + for(var/I in recipe_paths[Rp]["Ingredients"]) + var/atom/ing = new I() + + //So now we add something like "Bread" = 3 + if(ing.name in working_ing_list) + working_ing_list[ing.name] = working_ing_list[ing.name]++ + else + working_ing_list[ing.name] = 1 + + recipe_paths[Rp]["Ingredients"] = working_ing_list + + //Reagents can be resolved to nicer names as well + for(var/rid in recipe_paths[Rp]["Reagents"]) + var/datum/reagent/Rd = chemical_reagents_list[rid] + var/R_name = Rd.name + recipe_paths[Rp]["Reagents"][R_name] += recipe_paths[Rp]["Reagents"][rid] + recipe_paths[Rp]["Reagents"] -= rid + + //Sort list by transforming into resultname+unique = path, then back in the right order + //Can't just be sorted by resultname since they are not unique and lists indexed by that will + //end up overwriting the several ways to make something with a single one + var/list/names_to_paths = list() + for(var/Rp in recipe_paths) + names_to_paths["[recipe_paths[Rp]["Result"]] [Rp]"] = Rp //Append recipe datum path to keep uniqueness + + names_to_paths = sortAssoc(names_to_paths) + + var/list/newly_sorted = list() + for(var/Rr in names_to_paths) + var/Rp = names_to_paths[Rr] + newly_sorted[Rp] = recipe_paths[Rp] + + recipe_paths = newly_sorted + + //Produce Output + var/html = "\ + \ + \ + \ + \ + Food Recipes\ + \ + " + + html += "

Recipes (as of [time2text(world.realtime,"MMM DD, YYYY")])


" + html += "" + html += "" + for(var/Rp in recipe_paths) + //Open this row + html += "" + + //Image + var/image_path = "recipe-[ckey(recipe_paths[Rp]["Result"])].png" + var/icon/icon_to_give = recipe_paths[Rp]["Image"] + html += "" + src << browse(icon_to_give, "window=picture;file=[image_path];display=0") + + //Name + html += "" + + //Ingredients + html += "" + //Close this row + html += "" + + html += "
IconNameIngredients
[recipe_paths[Rp]["Result"]]
    " + var/count //For those commas. Not sure of a great other way to do it. + //For each large ingredient + var/pretty_ing = "" + count = 0 + for(var/ing in recipe_paths[Rp]["Ingredients"]) + pretty_ing += "[count == 0 ? "" : ", "][recipe_paths[Rp]["Ingredients"][ing]]x [ing]" + count++ + if(pretty_ing != "") + html += "
  • Ingredients: [pretty_ing]
  • " + + //For each fruit + var/pretty_fru = "" + count = 0 + for(var/fru in recipe_paths[Rp]["Fruit"]) + pretty_fru += "[count == 0 ? "" : ", "][recipe_paths[Rp]["Fruit"][fru]]x [fru]" + count++ + if(pretty_fru != "") + html += "
  • Fruit: [pretty_fru]
  • " + + //For each reagent + var/pretty_rea = "" + count = 0 + for(var/rea in recipe_paths[Rp]["Reagents"]) + pretty_rea += "[count == 0 ? "" : ", "][recipe_paths[Rp]["Reagents"][rea]]u [rea]" + count++ + if(pretty_rea != "") + html += "
  • Mix in: [pretty_rea]
  • " + + //Close ingredients + html += "
" + src << browse(html, "window=recipes;file=recipes.html;display=0") + src << "In your byond cache, recipe-xxx.png files and recipes.html now exist. Place recipe-xxx.png files in a subfolder named 'imgrecipes' wherever you put them. The file will take a recipes.css file if in the same path." diff --git a/vorestation.dme b/vorestation.dme index 31b63160a99..ac593c394ed 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1451,6 +1451,7 @@ #include "code\modules\flufftext\Dreaming.dm" #include "code\modules\flufftext\Hallucination.dm" #include "code\modules\flufftext\TextFilters.dm" +#include "code\modules\food\recipe_dump.dm" #include "code\modules\food\recipes_microwave.dm" #include "code\modules\food\recipes_microwave_vr.dm" #include "code\modules\gamemaster\controller.dm" From bbd5603905005ad88853c5a7c0f2ec92f53a931c Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Fri, 10 Mar 2017 18:45:06 -0500 Subject: [PATCH 2/4] Math is hard okay --- code/modules/food/recipe_dump.dm | 3 ++- code/modules/reagents/reagent_containers/food/snacks.dm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/food/recipe_dump.dm b/code/modules/food/recipe_dump.dm index f33be272589..15fe52121da 100644 --- a/code/modules/food/recipe_dump.dm +++ b/code/modules/food/recipe_dump.dm @@ -34,7 +34,8 @@ //So now we add something like "Bread" = 3 if(ing.name in working_ing_list) - working_ing_list[ing.name] = working_ing_list[ing.name]++ + var/sofar = working_ing_list[ing.name] + working_ing_list[ing.name] = sofar+1 else working_ing_list[ing.name] = 1 diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 8bb92f2eebd..a89e10a66a4 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -737,7 +737,7 @@ src.bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/xenomeat - name = "meat" + name = "xenomeat" desc = "A slab of green meat. Smells like acid." icon_state = "xenomeat" filling_color = "#43DE18" From fd58913efa19a0593e4b7f1b247d54a38ddc609b Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Fri, 10 Mar 2017 20:04:24 -0500 Subject: [PATCH 3/4] Now it does drinks and not-quite-foods too I had to subtype all the recipes though. This should probably have been done a while ago anyway, medicine and drinks should probably have some sort of path separation like this. --- code/modules/food/recipe_dump.dm | 165 +++++++++++---- code/modules/reagents/Chemistry-Recipes.dm | 221 ++++++++++----------- 2 files changed, 235 insertions(+), 151 deletions(-) diff --git a/code/modules/food/recipe_dump.dm b/code/modules/food/recipe_dump.dm index 15fe52121da..5138b7c0c0f 100644 --- a/code/modules/food/recipe_dump.dm +++ b/code/modules/food/recipe_dump.dm @@ -1,14 +1,24 @@ /client/proc/recipe_dump() set name = "Generate Recipe Dump" set category = "Server" - set desc = "Dumps food recipe info and images for wiki or other use." + set desc = "Dumps food and drink recipe info and images for wiki or other use." if(!holder) return - var/list/recipe_paths = typesof(/datum/recipe) - /datum/recipe + //////////////////////// DRINK + var/list/drink_recipes = list() + for(var/path in typesof(/datum/chemical_reaction/drinks) - /datum/chemical_reaction/drinks) + var/datum/chemical_reaction/drinks/CR = new path() + drink_recipes[path] = list("Result" = CR.name, + "ResAmt" = CR.result_amount, + "Reagents" = CR.required_reagents) + qdel(CR) + + //////////////////////// FOOD + var/list/food_recipes = typesof(/datum/recipe) - /datum/recipe //Build a useful list - for(var/Rp in recipe_paths) + for(var/Rp in food_recipes) //Lists don't work with datum-stealing no-instance initial() so we have to. var/datum/recipe/R = new Rp() var/obj/res = new R.result() @@ -16,8 +26,9 @@ var/icon/result_icon = icon(res.icon,res.icon_state) result_icon.Scale(64,64) - recipe_paths[Rp] = list( + food_recipes[Rp] = list( "Result" = "[res.name]", + "ResAmt" = "1", "Reagents" = R.reagents, "Fruit" = R.fruit, "Ingredients" = R.items, @@ -27,9 +38,22 @@ qdel(res) qdel(R) - //Items needs further processing into human-readability. Another use of initial. + //////////////////////// FOOD+ (basically condiments, tofu, cheese, soysauce, etc) + for(var/path in typesof(/datum/chemical_reaction/food) - /datum/chemical_reaction/food) + var/datum/chemical_reaction/food/CR = new path() + food_recipes[path] = list("Result" = CR.name, + "ResAmt" = CR.result_amount, + "Reagents" = CR.required_reagents, + "Fruit" = list(), + "Ingredients" = list(), + "Image" = null) + qdel(CR) + + //////////////////////// PROCESSING + //Items needs further processing into human-readability. + for(var/Rp in food_recipes) var/working_ing_list = list() - for(var/I in recipe_paths[Rp]["Ingredients"]) + for(var/I in food_recipes[Rp]["Ingredients"]) var/atom/ing = new I() //So now we add something like "Bread" = 3 @@ -39,56 +63,76 @@ else working_ing_list[ing.name] = 1 - recipe_paths[Rp]["Ingredients"] = working_ing_list + food_recipes[Rp]["Ingredients"] = working_ing_list - //Reagents can be resolved to nicer names as well - for(var/rid in recipe_paths[Rp]["Reagents"]) + //Reagents can be resolved to nicer names as well + for(var/Rp in food_recipes) + for(var/rid in food_recipes[Rp]["Reagents"]) var/datum/reagent/Rd = chemical_reagents_list[rid] var/R_name = Rd.name - recipe_paths[Rp]["Reagents"][R_name] += recipe_paths[Rp]["Reagents"][rid] - recipe_paths[Rp]["Reagents"] -= rid + food_recipes[Rp]["Reagents"][R_name] += food_recipes[Rp]["Reagents"][rid] + food_recipes[Rp]["Reagents"] -= rid + for(var/Rp in drink_recipes) + for(var/rid in drink_recipes[Rp]["Reagents"]) + var/datum/reagent/Rd = chemical_reagents_list[rid] + var/R_name = Rd.name + drink_recipes[Rp]["Reagents"][R_name] += drink_recipes[Rp]["Reagents"][rid] + drink_recipes[Rp]["Reagents"] -= rid - //Sort list by transforming into resultname+unique = path, then back in the right order - //Can't just be sorted by resultname since they are not unique and lists indexed by that will - //end up overwriting the several ways to make something with a single one - var/list/names_to_paths = list() - for(var/Rp in recipe_paths) - names_to_paths["[recipe_paths[Rp]["Result"]] [Rp]"] = Rp //Append recipe datum path to keep uniqueness + //////////////////////// SORTING + var/list/foods_to_paths = list() + var/list/drinks_to_paths = list() - names_to_paths = sortAssoc(names_to_paths) + for(var/Rp in food_recipes) + foods_to_paths["[food_recipes[Rp]["Result"]] [Rp]"] = Rp //Append recipe datum path to keep uniqueness + for(var/Rp in drink_recipes) + drinks_to_paths["[drink_recipes[Rp]["Result"]] [Rp]"] = Rp - var/list/newly_sorted = list() - for(var/Rr in names_to_paths) - var/Rp = names_to_paths[Rr] - newly_sorted[Rp] = recipe_paths[Rp] + foods_to_paths = sortAssoc(foods_to_paths) + drinks_to_paths = sortAssoc(drinks_to_paths) - recipe_paths = newly_sorted + var/list/foods_newly_sorted = list() + var/list/drinks_newly_sorted = list() - //Produce Output + for(var/Rr in foods_to_paths) + var/Rp = foods_to_paths[Rr] + foods_newly_sorted[Rp] = food_recipes[Rp] + for(var/Rr in drinks_to_paths) + var/Rp = drinks_to_paths[Rr] + drinks_newly_sorted[Rp] = drink_recipes[Rp] + + food_recipes = foods_newly_sorted + drink_recipes = drinks_newly_sorted + + //////////////////////// OUTPUT + //Food Output var/html = "\ \ \ \ \ Food Recipes\ - \ + \ " - html += "

Recipes (as of [time2text(world.realtime,"MMM DD, YYYY")])


" + html += "

Food Recipes (as of [time2text(world.realtime,"MMM DD, YYYY")])


" html += "" html += "" - for(var/Rp in recipe_paths) + for(var/Rp in food_recipes) //Open this row html += "" //Image - var/image_path = "recipe-[ckey(recipe_paths[Rp]["Result"])].png" - var/icon/icon_to_give = recipe_paths[Rp]["Image"] - html += "" - src << browse(icon_to_give, "window=picture;file=[image_path];display=0") + var/icon/icon_to_give = food_recipes[Rp]["Image"] + if(icon_to_give) + var/image_path = "recipe-[ckey(food_recipes[Rp]["Result"])].png" + html += "" + src << browse(icon_to_give, "window=picture;file=[image_path];display=0") + else + html += "" //Name - html += "" + html += "" //Ingredients html += "" html += "
IconNameIngredients
No
Image
[recipe_paths[Rp]["Result"]][food_recipes[Rp]["Result"]]
    " @@ -96,8 +140,8 @@ //For each large ingredient var/pretty_ing = "" count = 0 - for(var/ing in recipe_paths[Rp]["Ingredients"]) - pretty_ing += "[count == 0 ? "" : ", "][recipe_paths[Rp]["Ingredients"][ing]]x [ing]" + for(var/ing in food_recipes[Rp]["Ingredients"]) + pretty_ing += "[count == 0 ? "" : ", "][food_recipes[Rp]["Ingredients"][ing]]x [ing]" count++ if(pretty_ing != "") html += "
  • Ingredients: [pretty_ing]
  • " @@ -105,8 +149,8 @@ //For each fruit var/pretty_fru = "" count = 0 - for(var/fru in recipe_paths[Rp]["Fruit"]) - pretty_fru += "[count == 0 ? "" : ", "][recipe_paths[Rp]["Fruit"][fru]]x [fru]" + for(var/fru in food_recipes[Rp]["Fruit"]) + pretty_fru += "[count == 0 ? "" : ", "][food_recipes[Rp]["Fruit"][fru]]x [fru]" count++ if(pretty_fru != "") html += "
  • Fruit: [pretty_fru]
  • " @@ -114,8 +158,8 @@ //For each reagent var/pretty_rea = "" count = 0 - for(var/rea in recipe_paths[Rp]["Reagents"]) - pretty_rea += "[count == 0 ? "" : ", "][recipe_paths[Rp]["Reagents"][rea]]u [rea]" + for(var/rea in food_recipes[Rp]["Reagents"]) + pretty_rea += "[count == 0 ? "" : ", "][food_recipes[Rp]["Reagents"][rea]]u [rea]" count++ if(pretty_rea != "") html += "
  • Mix in: [pretty_rea]
  • " @@ -126,5 +170,46 @@ html += "
" - src << browse(html, "window=recipes;file=recipes.html;display=0") - src << "In your byond cache, recipe-xxx.png files and recipes.html now exist. Place recipe-xxx.png files in a subfolder named 'imgrecipes' wherever you put them. The file will take a recipes.css file if in the same path." + src << browse(html, "window=recipes;file=recipes_food.html;display=0") + + //Drink Output + html = "\ + \ + \ + \ + \ + Drink Recipes\ + \ + " + + html += "

Drink Recipes (as of [time2text(world.realtime,"MMM DD, YYYY")])


" + html += "" + html += "" + for(var/Rp in drink_recipes) + //Open this row + html += "" + + //Name + html += "" + + html += "" + //Close this row + html += "" + + html += "
NameIngredients
[drink_recipes[Rp]["Result"]]" + //For each reagent + var/pretty_rea = "" + var/count = 0 + for(var/rea in drink_recipes[Rp]["Reagents"]) + pretty_rea += "[count == 0 ? "" : ", "][drink_recipes[Rp]["Reagents"][rea]]u [rea]" + count++ + if(pretty_rea != "") + html += "
  • Mix together: [pretty_rea]
  • " + + html += "
  • Makes [drink_recipes[Rp]["ResAmt"]]u
  • " + + //Close reagents + html += "
    " + src << browse(html, "window=recipes;file=recipes_drinks.html;display=0") + + src << "In your byond cache, recipe-xxx.png files and recipes_drinks.html and recipes_food.html now exist. Place recipe-xxx.png files in a subfolder named 'imgrecipes' wherever you put them. The file will take a food.css or drinks.css file if in the same path." diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index d63cacfb948..433bea0d4ba 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -557,7 +557,6 @@ required_reagents = list("mindbreaker" = 1, "carbon" = 1) result_amount = 3 - /datum/chemical_reaction/paroxetine name = "Paroxetine" id = "paroxetine" @@ -565,6 +564,20 @@ required_reagents = list("mindbreaker" = 1, "oxygen" = 1, "inaprovaline" = 1) result_amount = 3 +/datum/chemical_reaction/neurotoxin + name = "Neurotoxin" + id = "neurotoxin" + result = "neurotoxin" + required_reagents = list("gargleblaster" = 1, "stoxin" = 1) + result_amount = 2 + +/datum/chemical_reaction/luminol + name = "Luminol" + id = "luminol" + result = "luminol" + required_reagents = list("hydrogen" = 2, "carbon" = 2, "ammonia" = 2) + result_amount = 6 + /* Solidification */ /datum/chemical_reaction/phoronsolidification @@ -1027,7 +1040,7 @@ /* Food */ -/datum/chemical_reaction/tofu +/datum/chemical_reaction/food/tofu name = "Tofu" id = "tofu" result = null @@ -1041,7 +1054,7 @@ new /obj/item/weapon/reagent_containers/food/snacks/tofu(location) return -/datum/chemical_reaction/chocolate_bar +/datum/chemical_reaction/food/chocolate_bar name = "Chocolate Bar" id = "chocolate_bar" result = null @@ -1054,7 +1067,7 @@ new /obj/item/weapon/reagent_containers/food/snacks/chocolatebar(location) return -/datum/chemical_reaction/chocolate_bar2 +/datum/chemical_reaction/food/chocolate_bar2 name = "Chocolate Bar" id = "chocolate_bar" result = null @@ -1067,28 +1080,28 @@ new /obj/item/weapon/reagent_containers/food/snacks/chocolatebar(location) return -/datum/chemical_reaction/hot_coco +/datum/chemical_reaction/drinks/hot_coco name = "Hot Coco" id = "hot_coco" result = "hot_coco" required_reagents = list("water" = 5, "coco" = 1) result_amount = 5 -/datum/chemical_reaction/soysauce +/datum/chemical_reaction/food/soysauce name = "Soy Sauce" id = "soysauce" result = "soysauce" required_reagents = list("soymilk" = 4, "sacid" = 1) result_amount = 5 -/datum/chemical_reaction/ketchup +/datum/chemical_reaction/food/ketchup name = "Ketchup" id = "ketchup" result = "ketchup" required_reagents = list("tomatojuice" = 2, "water" = 1, "sugar" = 1) result_amount = 4 -/datum/chemical_reaction/cheesewheel +/datum/chemical_reaction/food/cheesewheel name = "Cheesewheel" id = "cheesewheel" result = null @@ -1102,7 +1115,7 @@ new /obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesewheel(location) return -/datum/chemical_reaction/meatball +/datum/chemical_reaction/food/meatball name = "Meatball" id = "meatball" result = null @@ -1115,7 +1128,7 @@ new /obj/item/weapon/reagent_containers/food/snacks/meatball(location) return -/datum/chemical_reaction/dough +/datum/chemical_reaction/food/dough name = "Dough" id = "dough" result = null @@ -1128,7 +1141,7 @@ new /obj/item/weapon/reagent_containers/food/snacks/dough(location) return -/datum/chemical_reaction/syntiflesh +/datum/chemical_reaction/food/syntiflesh name = "Syntiflesh" id = "syntiflesh" result = null @@ -1157,49 +1170,49 @@ /* Alcohol */ -/datum/chemical_reaction/goldschlager +/datum/chemical_reaction/drinks/goldschlager name = "Goldschlager" id = "goldschlager" result = "goldschlager" required_reagents = list("vodka" = 10, "gold" = 1) result_amount = 10 -/datum/chemical_reaction/patron +/datum/chemical_reaction/drinks/patron name = "Patron" id = "patron" result = "patron" required_reagents = list("tequilla" = 10, "silver" = 1) result_amount = 10 -/datum/chemical_reaction/bilk +/datum/chemical_reaction/drinks/bilk name = "Bilk" id = "bilk" result = "bilk" required_reagents = list("milk" = 1, "beer" = 1) result_amount = 2 -/datum/chemical_reaction/icetea +/datum/chemical_reaction/drinks/icetea name = "Iced Tea" id = "icetea" result = "icetea" required_reagents = list("ice" = 1, "tea" = 2) result_amount = 3 -/datum/chemical_reaction/icecoffee +/datum/chemical_reaction/drinks/icecoffee name = "Iced Coffee" id = "icecoffee" result = "icecoffee" required_reagents = list("ice" = 1, "coffee" = 2) result_amount = 3 -/datum/chemical_reaction/nuka_cola +/datum/chemical_reaction/drinks/nuka_cola name = "Nuka Cola" id = "nuka_cola" result = "nuka_cola" required_reagents = list("uranium" = 1, "cola" = 5) result_amount = 5 -/datum/chemical_reaction/moonshine +/datum/chemical_reaction/drinks/moonshine name = "Moonshine" id = "moonshine" result = "moonshine" @@ -1207,7 +1220,7 @@ catalysts = list("enzyme" = 5) result_amount = 10 -/datum/chemical_reaction/grenadine +/datum/chemical_reaction/drinks/grenadine name = "Grenadine Syrup" id = "grenadine" result = "grenadine" @@ -1215,7 +1228,7 @@ catalysts = list("enzyme" = 5) result_amount = 10 -/datum/chemical_reaction/wine +/datum/chemical_reaction/drinks/wine name = "Wine" id = "wine" result = "wine" @@ -1223,7 +1236,7 @@ catalysts = list("enzyme" = 5) result_amount = 10 -/datum/chemical_reaction/pwine +/datum/chemical_reaction/drinks/pwine name = "Poison Wine" id = "pwine" result = "pwine" @@ -1231,7 +1244,7 @@ catalysts = list("enzyme" = 5) result_amount = 10 -/datum/chemical_reaction/melonliquor +/datum/chemical_reaction/drinks/melonliquor name = "Melon Liquor" id = "melonliquor" result = "melonliquor" @@ -1239,7 +1252,7 @@ catalysts = list("enzyme" = 5) result_amount = 10 -/datum/chemical_reaction/bluecuracao +/datum/chemical_reaction/drinks/bluecuracao name = "Blue Curacao" id = "bluecuracao" result = "bluecuracao" @@ -1247,7 +1260,7 @@ catalysts = list("enzyme" = 5) result_amount = 10 -/datum/chemical_reaction/spacebeer +/datum/chemical_reaction/drinks/spacebeer name = "Space Beer" id = "spacebeer" result = "beer" @@ -1255,7 +1268,7 @@ catalysts = list("enzyme" = 5) result_amount = 10 -/datum/chemical_reaction/vodka +/datum/chemical_reaction/drinks/vodka name = "Vodka" id = "vodka" result = "vodka" @@ -1263,7 +1276,7 @@ catalysts = list("enzyme" = 5) result_amount = 10 -/datum/chemical_reaction/sake +/datum/chemical_reaction/drinks/sake name = "Sake" id = "sake" result = "sake" @@ -1271,7 +1284,7 @@ catalysts = list("enzyme" = 5) result_amount = 10 -/datum/chemical_reaction/kahlua +/datum/chemical_reaction/drinks/kahlua name = "Kahlua" id = "kahlua" result = "kahlua" @@ -1279,287 +1292,287 @@ catalysts = list("enzyme" = 5) result_amount = 5 -/datum/chemical_reaction/gin_tonic +/datum/chemical_reaction/drinks/gin_tonic name = "Gin and Tonic" id = "gintonic" result = "gintonic" required_reagents = list("gin" = 2, "tonic" = 1) result_amount = 3 -/datum/chemical_reaction/cuba_libre +/datum/chemical_reaction/drinks/cuba_libre name = "Cuba Libre" id = "cubalibre" result = "cubalibre" required_reagents = list("rum" = 2, "cola" = 1) result_amount = 3 -/datum/chemical_reaction/martini +/datum/chemical_reaction/drinks/martini name = "Classic Martini" id = "martini" result = "martini" required_reagents = list("gin" = 2, "vermouth" = 1) result_amount = 3 -/datum/chemical_reaction/vodkamartini +/datum/chemical_reaction/drinks/vodkamartini name = "Vodka Martini" id = "vodkamartini" result = "vodkamartini" required_reagents = list("vodka" = 2, "vermouth" = 1) result_amount = 3 -/datum/chemical_reaction/white_russian +/datum/chemical_reaction/drinks/white_russian name = "White Russian" id = "whiterussian" result = "whiterussian" required_reagents = list("blackrussian" = 2, "cream" = 1) result_amount = 3 -/datum/chemical_reaction/whiskey_cola +/datum/chemical_reaction/drinks/whiskey_cola name = "Whiskey Cola" id = "whiskeycola" result = "whiskeycola" required_reagents = list("whiskey" = 2, "cola" = 1) result_amount = 3 -/datum/chemical_reaction/screwdriver +/datum/chemical_reaction/drinks/screwdriver name = "Screwdriver" id = "screwdrivercocktail" result = "screwdrivercocktail" required_reagents = list("vodka" = 2, "orangejuice" = 1) result_amount = 3 -/datum/chemical_reaction/bloody_mary +/datum/chemical_reaction/drinks/bloody_mary name = "Bloody Mary" id = "bloodymary" result = "bloodymary" required_reagents = list("vodka" = 2, "tomatojuice" = 3, "limejuice" = 1) result_amount = 6 -/datum/chemical_reaction/gargle_blaster +/datum/chemical_reaction/drinks/gargle_blaster name = "Pan-Galactic Gargle Blaster" id = "gargleblaster" result = "gargleblaster" required_reagents = list("vodka" = 2, "gin" = 1, "whiskey" = 1, "cognac" = 1, "limejuice" = 1) result_amount = 6 -/datum/chemical_reaction/brave_bull +/datum/chemical_reaction/drinks/brave_bull name = "Brave Bull" id = "bravebull" result = "bravebull" required_reagents = list("tequilla" = 2, "kahlua" = 1) result_amount = 3 -/datum/chemical_reaction/tequilla_sunrise +/datum/chemical_reaction/drinks/tequilla_sunrise name = "Tequilla Sunrise" id = "tequillasunrise" result = "tequillasunrise" required_reagents = list("tequilla" = 2, "orangejuice" = 1) result_amount = 3 -/datum/chemical_reaction/phoron_special +/datum/chemical_reaction/drinks/phoron_special name = "Toxins Special" id = "phoronspecial" result = "phoronspecial" required_reagents = list("rum" = 2, "vermouth" = 2, "phoron" = 2) result_amount = 6 -/datum/chemical_reaction/beepsky_smash +/datum/chemical_reaction/drinks/beepsky_smash name = "Beepksy Smash" id = "beepksysmash" result = "beepskysmash" required_reagents = list("limejuice" = 1, "whiskey" = 1, "iron" = 1) result_amount = 2 -/datum/chemical_reaction/doctor_delight +/datum/chemical_reaction/drinks/doctor_delight name = "The Doctor's Delight" id = "doctordelight" result = "doctorsdelight" required_reagents = list("limejuice" = 1, "tomatojuice" = 1, "orangejuice" = 1, "cream" = 2, "tricordrazine" = 1) result_amount = 6 -/datum/chemical_reaction/irish_cream +/datum/chemical_reaction/drinks/irish_cream name = "Irish Cream" id = "irishcream" result = "irishcream" required_reagents = list("whiskey" = 2, "cream" = 1) result_amount = 3 -/datum/chemical_reaction/manly_dorf +/datum/chemical_reaction/drinks/manly_dorf name = "The Manly Dorf" id = "manlydorf" result = "manlydorf" required_reagents = list ("beer" = 1, "ale" = 2) result_amount = 3 -/datum/chemical_reaction/hooch +/datum/chemical_reaction/drinks/hooch name = "Hooch" id = "hooch" result = "hooch" required_reagents = list ("sugar" = 1, "ethanol" = 2, "fuel" = 1) result_amount = 3 -/datum/chemical_reaction/irish_coffee +/datum/chemical_reaction/drinks/irish_coffee name = "Irish Coffee" id = "irishcoffee" result = "irishcoffee" required_reagents = list("irishcream" = 1, "coffee" = 1) result_amount = 2 -/datum/chemical_reaction/b52 +/datum/chemical_reaction/drinks/b52 name = "B-52" id = "b52" result = "b52" required_reagents = list("irishcream" = 1, "kahlua" = 1, "cognac" = 1) result_amount = 3 -/datum/chemical_reaction/atomicbomb +/datum/chemical_reaction/drinks/atomicbomb name = "Atomic Bomb" id = "atomicbomb" result = "atomicbomb" required_reagents = list("b52" = 10, "uranium" = 1) result_amount = 10 -/datum/chemical_reaction/margarita +/datum/chemical_reaction/drinks/margarita name = "Margarita" id = "margarita" result = "margarita" required_reagents = list("tequilla" = 2, "limejuice" = 1) result_amount = 3 -/datum/chemical_reaction/longislandicedtea +/datum/chemical_reaction/drinks/longislandicedtea name = "Long Island Iced Tea" id = "longislandicedtea" result = "longislandicedtea" required_reagents = list("vodka" = 1, "gin" = 1, "tequilla" = 1, "cubalibre" = 3) result_amount = 6 -/datum/chemical_reaction/icedtea +/datum/chemical_reaction/drinks/icedtea name = "Long Island Iced Tea" id = "longislandicedtea" result = "longislandicedtea" required_reagents = list("vodka" = 1, "gin" = 1, "tequilla" = 1, "cubalibre" = 3) result_amount = 6 -/datum/chemical_reaction/threemileisland +/datum/chemical_reaction/drinks/threemileisland name = "Three Mile Island Iced Tea" id = "threemileisland" result = "threemileisland" required_reagents = list("longislandicedtea" = 10, "uranium" = 1) result_amount = 10 -/datum/chemical_reaction/whiskeysoda +/datum/chemical_reaction/drinks/whiskeysoda name = "Whiskey Soda" id = "whiskeysoda" result = "whiskeysoda" required_reagents = list("whiskey" = 2, "sodawater" = 1) result_amount = 3 -/datum/chemical_reaction/black_russian +/datum/chemical_reaction/drinks/black_russian name = "Black Russian" id = "blackrussian" result = "blackrussian" required_reagents = list("vodka" = 2, "kahlua" = 1) result_amount = 3 -/datum/chemical_reaction/manhattan +/datum/chemical_reaction/drinks/manhattan name = "Manhattan" id = "manhattan" result = "manhattan" required_reagents = list("whiskey" = 2, "vermouth" = 1) result_amount = 3 -/datum/chemical_reaction/manhattan_proj +/datum/chemical_reaction/drinks/manhattan_proj name = "Manhattan Project" id = "manhattan_proj" result = "manhattan_proj" required_reagents = list("manhattan" = 10, "uranium" = 1) result_amount = 10 -/datum/chemical_reaction/vodka_tonic +/datum/chemical_reaction/drinks/vodka_tonic name = "Vodka and Tonic" id = "vodkatonic" result = "vodkatonic" required_reagents = list("vodka" = 2, "tonic" = 1) result_amount = 3 -/datum/chemical_reaction/gin_fizz +/datum/chemical_reaction/drinks/gin_fizz name = "Gin Fizz" id = "ginfizz" result = "ginfizz" required_reagents = list("gin" = 1, "sodawater" = 1, "limejuice" = 1) result_amount = 3 -/datum/chemical_reaction/bahama_mama +/datum/chemical_reaction/drinks/bahama_mama name = "Bahama mama" id = "bahama_mama" result = "bahama_mama" required_reagents = list("rum" = 2, "orangejuice" = 2, "limejuice" = 1, "ice" = 1) result_amount = 6 -/datum/chemical_reaction/singulo +/datum/chemical_reaction/drinks/singulo name = "Singulo" id = "singulo" result = "singulo" required_reagents = list("vodka" = 5, "radium" = 1, "wine" = 5) result_amount = 10 -/datum/chemical_reaction/alliescocktail +/datum/chemical_reaction/drinks/alliescocktail name = "Allies Cocktail" id = "alliescocktail" result = "alliescocktail" required_reagents = list("martini" = 1, "vodka" = 1) result_amount = 2 -/datum/chemical_reaction/demonsblood +/datum/chemical_reaction/drinks/demonsblood name = "Demons Blood" id = "demonsblood" result = "demonsblood" required_reagents = list("rum" = 3, "spacemountainwind" = 1, "blood" = 1, "dr_gibb" = 1) result_amount = 6 -/datum/chemical_reaction/booger +/datum/chemical_reaction/drinks/booger name = "Booger" id = "booger" result = "booger" required_reagents = list("cream" = 2, "banana" = 1, "rum" = 1, "watermelonjuice" = 1) result_amount = 5 -/datum/chemical_reaction/antifreeze +/datum/chemical_reaction/drinks/antifreeze name = "Anti-freeze" id = "antifreeze" result = "antifreeze" required_reagents = list("vodka" = 1, "cream" = 1, "ice" = 1) result_amount = 3 -/datum/chemical_reaction/barefoot +/datum/chemical_reaction/drinks/barefoot name = "Barefoot" id = "barefoot" result = "barefoot" required_reagents = list("berryjuice" = 1, "cream" = 1, "vermouth" = 1) result_amount = 3 -/datum/chemical_reaction/grapesoda +/datum/chemical_reaction/drinks/grapesoda name = "Grape Soda" id = "grapesoda" result = "grapesoda" required_reagents = list("grapejuice" = 2, "cola" = 1) result_amount = 3 -/datum/chemical_reaction/sbiten +/datum/chemical_reaction/drinks/sbiten name = "Sbiten" id = "sbiten" result = "sbiten" required_reagents = list("vodka" = 10, "capsaicin" = 1) result_amount = 10 -/datum/chemical_reaction/red_mead +/datum/chemical_reaction/drinks/red_mead name = "Red Mead" id = "red_mead" result = "red_mead" required_reagents = list("blood" = 1, "mead" = 1) result_amount = 2 -/datum/chemical_reaction/mead +/datum/chemical_reaction/drinks/mead name = "Mead" id = "mead" result = "mead" @@ -1567,217 +1580,203 @@ catalysts = list("enzyme" = 5) result_amount = 2 -/datum/chemical_reaction/iced_beer +/datum/chemical_reaction/drinks/iced_beer name = "Iced Beer" id = "iced_beer" result = "iced_beer" required_reagents = list("beer" = 10, "frostoil" = 1) result_amount = 10 -/datum/chemical_reaction/iced_beer2 +/datum/chemical_reaction/drinks/iced_beer2 name = "Iced Beer" id = "iced_beer" result = "iced_beer" required_reagents = list("beer" = 5, "ice" = 1) result_amount = 6 -/datum/chemical_reaction/grog +/datum/chemical_reaction/drinks/grog name = "Grog" id = "grog" result = "grog" required_reagents = list("rum" = 1, "water" = 1) result_amount = 2 -/datum/chemical_reaction/soy_latte +/datum/chemical_reaction/drinks/soy_latte name = "Soy Latte" id = "soy_latte" result = "soy_latte" required_reagents = list("coffee" = 1, "soymilk" = 1) result_amount = 2 -/datum/chemical_reaction/cafe_latte +/datum/chemical_reaction/drinks/cafe_latte name = "Cafe Latte" id = "cafe_latte" result = "cafe_latte" required_reagents = list("coffee" = 1, "milk" = 1) result_amount = 2 -/datum/chemical_reaction/acidspit +/datum/chemical_reaction/drinks/acidspit name = "Acid Spit" id = "acidspit" result = "acidspit" required_reagents = list("sacid" = 1, "wine" = 5) result_amount = 6 -/datum/chemical_reaction/amasec +/datum/chemical_reaction/drinks/amasec name = "Amasec" id = "amasec" result = "amasec" required_reagents = list("iron" = 1, "wine" = 5, "vodka" = 5) result_amount = 10 -/datum/chemical_reaction/changelingsting +/datum/chemical_reaction/drinks/changelingsting name = "Changeling Sting" id = "changelingsting" result = "changelingsting" required_reagents = list("screwdrivercocktail" = 1, "limejuice" = 1, "lemonjuice" = 1) result_amount = 3 -/datum/chemical_reaction/aloe +/datum/chemical_reaction/drinks/aloe name = "Aloe" id = "aloe" result = "aloe" required_reagents = list("cream" = 1, "whiskey" = 1, "watermelonjuice" = 1) result_amount = 3 -/datum/chemical_reaction/andalusia +/datum/chemical_reaction/drinks/andalusia name = "Andalusia" id = "andalusia" result = "andalusia" required_reagents = list("rum" = 1, "whiskey" = 1, "lemonjuice" = 1) result_amount = 3 -/datum/chemical_reaction/neurotoxin - name = "Neurotoxin" - id = "neurotoxin" - result = "neurotoxin" - required_reagents = list("gargleblaster" = 1, "stoxin" = 1) - result_amount = 2 - -/datum/chemical_reaction/snowwhite +/datum/chemical_reaction/drinks/snowwhite name = "Snow White" id = "snowwhite" result = "snowwhite" required_reagents = list("beer" = 1, "lemon_lime" = 1) result_amount = 2 -/datum/chemical_reaction/irishcarbomb +/datum/chemical_reaction/drinks/irishcarbomb name = "Irish Car Bomb" id = "irishcarbomb" result = "irishcarbomb" required_reagents = list("ale" = 1, "irishcream" = 1) result_amount = 2 -/datum/chemical_reaction/syndicatebomb +/datum/chemical_reaction/drinks/syndicatebomb name = "Syndicate Bomb" id = "syndicatebomb" result = "syndicatebomb" required_reagents = list("beer" = 1, "whiskeycola" = 1) result_amount = 2 -/datum/chemical_reaction/erikasurprise +/datum/chemical_reaction/drinks/erikasurprise name = "Erika Surprise" id = "erikasurprise" result = "erikasurprise" required_reagents = list("ale" = 2, "limejuice" = 1, "whiskey" = 1, "banana" = 1, "ice" = 1) result_amount = 6 -/datum/chemical_reaction/devilskiss +/datum/chemical_reaction/drinks/devilskiss name = "Devils Kiss" id = "devilskiss" result = "devilskiss" required_reagents = list("blood" = 1, "kahlua" = 1, "rum" = 1) result_amount = 3 -/datum/chemical_reaction/hippiesdelight +/datum/chemical_reaction/drinks/hippiesdelight name = "Hippies Delight" id = "hippiesdelight" result = "hippiesdelight" required_reagents = list("psilocybin" = 1, "gargleblaster" = 1) result_amount = 2 -/datum/chemical_reaction/bananahonk +/datum/chemical_reaction/drinks/bananahonk name = "Banana Honk" id = "bananahonk" result = "bananahonk" required_reagents = list("banana" = 1, "cream" = 1, "sugar" = 1) result_amount = 3 -/datum/chemical_reaction/silencer +/datum/chemical_reaction/drinks/silencer name = "Silencer" id = "silencer" result = "silencer" required_reagents = list("nothing" = 1, "cream" = 1, "sugar" = 1) result_amount = 3 -/datum/chemical_reaction/driestmartini +/datum/chemical_reaction/drinks/driestmartini name = "Driest Martini" id = "driestmartini" result = "driestmartini" required_reagents = list("nothing" = 1, "gin" = 1) result_amount = 2 -/datum/chemical_reaction/lemonade +/datum/chemical_reaction/drinks/lemonade name = "Lemonade" id = "lemonade" result = "lemonade" required_reagents = list("lemonjuice" = 1, "sugar" = 1, "water" = 1) result_amount = 3 -/datum/chemical_reaction/kiraspecial +/datum/chemical_reaction/drinks/kiraspecial name = "Kira Special" id = "kiraspecial" result = "kiraspecial" required_reagents = list("orangejuice" = 1, "limejuice" = 1, "sodawater" = 1) result_amount = 3 -/datum/chemical_reaction/brownstar +/datum/chemical_reaction/drinks/brownstar name = "Brown Star" id = "brownstar" result = "brownstar" required_reagents = list("orangejuice" = 2, "cola" = 1) result_amount = 3 -/datum/chemical_reaction/milkshake +/datum/chemical_reaction/drinks/milkshake name = "Milkshake" id = "milkshake" result = "milkshake" required_reagents = list("cream" = 1, "ice" = 2, "milk" = 2) result_amount = 5 -/datum/chemical_reaction/rewriter +/datum/chemical_reaction/drinks/rewriter name = "Rewriter" id = "rewriter" result = "rewriter" required_reagents = list("spacemountainwind" = 1, "coffee" = 1) result_amount = 2 -/datum/chemical_reaction/suidream +/datum/chemical_reaction/drinks/suidream name = "Sui Dream" id = "suidream" result = "suidream" required_reagents = list("space_up" = 1, "bluecuracao" = 1, "melonliquor" = 1) result_amount = 3 -/datum/chemical_reaction/luminol - name = "Luminol" - id = "luminol" - result = "luminol" - required_reagents = list("hydrogen" = 2, "carbon" = 2, "ammonia" = 2) - result_amount = 6 - -/datum/chemical_reaction/shirleytemple +/datum/chemical_reaction/drinks/shirleytemple name = "Shirley Temple" id = "shirley_temple" result = "shirley_temple" required_reagents = list("lemon_lime" = 4, "grenadine" = 1) result_amount = 5 -/datum/chemical_reaction/royrogers +/datum/chemical_reaction/drinks/royrogers name = "Roy Rogers" id = "roy_rogers" result = "roy_rogers" required_reagents = list("cola" = 4, "grenadine" = 1) result_amount = 5 -/datum/chemical_reaction/collinsmix +/datum/chemical_reaction/drinks/collinsmix name = "Collins Mix" id = "collins_mix" result = "collins_mix" required_reagents = list("lemon_lime" = 3, "sodawater" = 1) result_amount = 4 -/datum/chemical_reaction/arnoldpalmer +/datum/chemical_reaction/drinks/arnoldpalmer name = "Arnold Palmer" id = "arnold_palmer" result = "arnold_palmer" From 78f5111051728615b1c7134368d234817927bd3a Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Sat, 11 Mar 2017 01:13:51 -0500 Subject: [PATCH 4/4] Fix flour!!! --- code/modules/food/recipe_dump.dm | 6 ++++-- .../Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/food/recipe_dump.dm b/code/modules/food/recipe_dump.dm index 5138b7c0c0f..19f7988826f 100644 --- a/code/modules/food/recipe_dump.dm +++ b/code/modules/food/recipe_dump.dm @@ -70,14 +70,16 @@ for(var/rid in food_recipes[Rp]["Reagents"]) var/datum/reagent/Rd = chemical_reagents_list[rid] var/R_name = Rd.name - food_recipes[Rp]["Reagents"][R_name] += food_recipes[Rp]["Reagents"][rid] + var/amt = food_recipes[Rp]["Reagents"][rid] food_recipes[Rp]["Reagents"] -= rid + food_recipes[Rp]["Reagents"][R_name] = amt for(var/Rp in drink_recipes) for(var/rid in drink_recipes[Rp]["Reagents"]) var/datum/reagent/Rd = chemical_reagents_list[rid] var/R_name = Rd.name - drink_recipes[Rp]["Reagents"][R_name] += drink_recipes[Rp]["Reagents"][rid] + var/amt = drink_recipes[Rp]["Reagents"][rid] drink_recipes[Rp]["Reagents"] -= rid + drink_recipes[Rp]["Reagents"][R_name] = amt //////////////////////// SORTING var/list/foods_to_paths = list() 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 ac52b72768e..035eb2e2f92 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -114,7 +114,7 @@ M.drowsyness = max(M.drowsyness, 60) /datum/reagent/nutriment/flour - name = "flour" + name = "Flour" id = "flour" description = "This is what you rub all over yourself to pretend to be a ghost." taste_description = "chalky wheat"