From 351d1748fc75bf5b4d9f15c132110942f9f61047 Mon Sep 17 00:00:00 2001 From: Winter Flare <7543955+Owai-Seek@users.noreply.github.com> Date: Sun, 12 Jul 2020 22:05:08 -0400 Subject: [PATCH 1/3] Updates some comments. --- code/modules/food_and_drinks/food/snacks.dm | 31 +++++++++++++++------ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 900fc99171..13ad61758c 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -13,15 +13,30 @@ The nutriment reagent and bitesize variable replace the old heal_amt and amount bitesize of 2, then it'll take 3 bites to eat. Unlike the old system, the contained reagents are evenly spread among all the bites. No more contained reagents = no more bites. -Here is an example of the new formatting for anyone who wants to add more food items. +Food formatting and crafting examples. ``` -/obj/item/reagent_containers/food/snacks/xenoburger //Identification path for the object. - name = "Xenoburger" //Name that displays in the UI. - desc = "Smells caustic. Tastes like heresy." //Duh - icon_state = "xburger" //Refers to an icon in food.dmi - list_reagents = list(/datum/reagent/xenomicrobes = 10, - /datum/reagent/consumable/nutriment = 2) //What's inside the snack. - bitesize = 3 //This is the amount each bite consumes. +/obj/item/reagent_containers/food/snacks/saltedcornchips //Identification path for the object. + name = "salted corn chips" //Name that displays when hovered over. + desc = "Manufactured in a far away factory." //Description on examine. + icon_state = "saltychip" //Refers to an icon, usually in food.dmi + list_reagents = list(/datum/reagent/consumable/nutriment = 6, //What's inside the snack, but only if spawned. For example, from a chemical reaction, vendor, or slime core spawn. + /datum/reagent/consumable/nutriment/vitamin = 2) + bonus_reagents = list(/datum/reagent/consumable/nutriment = 1, //What's -added- to the food, in addition to the reagents contained inside the foods used to craft it. Basically, a reward for cooking. + /datum/reagent/consumable/nutriment/vitamin = 1) ^^For example. Egg+Egg = 2Egg + Bonus Reagents. + filling_color = "#F4A460" //What color it will use if put in a custom food. + tastes = list("salt" = 1, "oil" = 1) //Descriptive flavoring displayed when eaten. IE: "You taste a bit of salt and a bit of oil." + foodtype = GRAIN | JUNKFOOD //Tag for racial or custom food preferences. IE: Most Lizards cannot have GRAIN. + +Crafting Recipe (See files in code/modules/food_and_drinks/recipes/tablecraft/) + +/datum/crafting_recipe/food/nachos + name ="Salted Corn Chips" //Name that displays in the Crafting UI + reqs = list( //The list of ingredients to make the food. + /obj/item/reagent_containers/food/snacks/tortilla = 1 + /datum/reagent/consumable/sodiumchloride = 1, //As a note, reagents and non-food items don't get added to the food. If you + ) ^^want the reagents, make sure the food item has it listed under bonus_reagents. + result = /obj/item/reagent_containers/food/snacks/saltedcornchips //Resulting object. + subcategory = CAT_MISCFOOD //Subcategory the food falls under in the Food Tab of the crafting menu. ``` All foods are distributed among various categories. Use common sense. From 20cc3cad55d9346a4100713ba1ce31d7c3414147 Mon Sep 17 00:00:00 2001 From: Winter Flare <7543955+Owai-Seek@users.noreply.github.com> Date: Sun, 12 Jul 2020 22:15:06 -0400 Subject: [PATCH 2/3] re-add bitesize. --- code/modules/food_and_drinks/food/snacks.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 13ad61758c..58fa37e6a8 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -19,6 +19,7 @@ Food formatting and crafting examples. name = "salted corn chips" //Name that displays when hovered over. desc = "Manufactured in a far away factory." //Description on examine. icon_state = "saltychip" //Refers to an icon, usually in food.dmi + bitesize = 3 //How many reagents are consumed in each bite. list_reagents = list(/datum/reagent/consumable/nutriment = 6, //What's inside the snack, but only if spawned. For example, from a chemical reaction, vendor, or slime core spawn. /datum/reagent/consumable/nutriment/vitamin = 2) bonus_reagents = list(/datum/reagent/consumable/nutriment = 1, //What's -added- to the food, in addition to the reagents contained inside the foods used to craft it. Basically, a reward for cooking. From d7f5de97da9e60724e7a7d72b30239d25f83d136 Mon Sep 17 00:00:00 2001 From: Winter Flare <7543955+Owai-Seek@users.noreply.github.com> Date: Sun, 12 Jul 2020 22:34:32 -0400 Subject: [PATCH 3/3] Oops. --- code/modules/food_and_drinks/food/snacks.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 58fa37e6a8..de264ff0e4 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -33,8 +33,8 @@ Crafting Recipe (See files in code/modules/food_and_drinks/recipes/tablecraft/) /datum/crafting_recipe/food/nachos name ="Salted Corn Chips" //Name that displays in the Crafting UI reqs = list( //The list of ingredients to make the food. - /obj/item/reagent_containers/food/snacks/tortilla = 1 - /datum/reagent/consumable/sodiumchloride = 1, //As a note, reagents and non-food items don't get added to the food. If you + /obj/item/reagent_containers/food/snacks/tortilla = 1, + /datum/reagent/consumable/sodiumchloride = 1 //As a note, reagents and non-food items don't get added to the food. If you ) ^^want the reagents, make sure the food item has it listed under bonus_reagents. result = /obj/item/reagent_containers/food/snacks/saltedcornchips //Resulting object. subcategory = CAT_MISCFOOD //Subcategory the food falls under in the Food Tab of the crafting menu.