snacks
Snacks
Items in the "Snacks" subcategory are food items that people actually eat. The key points are that they are created already filled with reagents and are destroyed when empty. Additionally, they make a "munching" noise when eaten.
Notes by Darem: Food in the "snacks" subtype can hold a maximum of 50 units. Generally speaking, you don't want to go over 40 total for the item because you want to leave space for extra condiments. If you want effect besides healing, add a reagent for it. Try to stick to existing reagents when possible (so if you want a stronger healing effect, just use omnizine). On use effect (such as the old officer eating a donut code) requires a unique reagent (unless you can figure out a better way).
The nutriment reagent and bitesize variable replace the old heal_amt and amount variables. Each unit of nutriment is equal to 2 of the old heal_amt variable. Bitesize is the rate at which the reagents are consumed. So if you have 6 nutriment and a 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.
Food formatting and crafting examples.
/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
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.
/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.
Procs | |
afterattack | Dunking |
---|
Proc Details
afterattack
Dunking