food 
Abstract class to allow us to easily create all the generic "normal" food without too much copy pasta of adding more components
Vars | |
| ant_attracting | Does our food normally attract ants? |
|---|---|
| bite_consumption | How much reagents per bite |
| crafted_food_buff | Buff given when a hand-crafted version of this item is consumed. Randomized according to crafting_complexity if not assigned. |
| crafting_complexity | How exquisite the meal is. Applicable to crafted food, increasing its quality. Spans from 0 to 5. |
| decomp_req_handle | Food that needs to be picked up in order to decompose. |
| decomp_type | What our food decomposes into. |
| decomposition_particles | Used to set decomposition stink particles for food, will have no particles if null |
| decomposition_time | Used to set custom decomposition times for food. Set to 0 to have it automatically set via the food's flags. |
| eat_time | How long it will take to eat this food without any other modifiers |
| eatverbs | Verbs used when eating this food in the to_chat messages |
| food_flags | Extra flags for things such as if the food is in a container or not |
| food_reagents | List of reagents this food gets on creation during reaction or map spawn |
| foodtypes | Bitflag of the types of food this food is made of by default (for food recipes, it depends on the ingredients) |
| foodtypes_added_when_cooked | Bitflag of the types of food that have to be added when cooked |
| foodtypes_removed_when_cooked | Bitflag of the types of food that have to be removed when the food is baked/microwaved/grilled/dried etc. |
| intrinsic_food_materials | A list of material paths. the main material in the custom_materials list is also added on init. |
| junkiness | How much junkiness this food has? God I should remove junkiness soon |
| max_volume | Amount of volume the food can contain |
| preserved_food | Food that's immune to decomposition. |
| starting_reagent_purity | Used to set custom starting reagent purity for synthetic and natural food. Ignored when set to null. |
| tastes | Tastes to describe this food |
| trash_type | Type of atom thats spawned after eating this item |
| venue_value | Price of this food if sold in a venue |
Procs | |
| make_bakeable | This proc handles bakeable components, overwrite if you want different bake results etc. |
| make_dryable | This proc handles the dryable element. Overwrite if you want special drying rack results. |
| make_edible | This proc adds the edible component, overwrite this if you for some reason want to change some specific args like callbacks. |
| make_germ_sensitive | This proc makes things infective and decomposing when they stay on the floor for too long. Set preserved_food to TRUE to make it never decompose. Set decomp_req_handle to TRUE to only make it decompose when someone picks it up. Requires /datum/component/germ_sensitive to detect exposure |
| make_grillable | This proc handles grillable components, overwrite if you want different grill results etc. |
| make_leave_trash | This proc handles trash components, overwrite this if you want the object to spawn trash |
| make_microwaveable | This proc handles the microwavable element. Overwrite if you want special microwave results. By default, all food is microwavable. However, they will be microwaved into a bad recipe (burnt mess). |
| make_processable | This proc handles processable elements, overwrite this if you want to add behavior such as slicing, forking, spooning, whatever, to turn the item into something else |
| pass_down_foodtypes | Proc called when the food is cooked (and the result is obviously still food) |
Var Details
ant_attracting 
Does our food normally attract ants?
bite_consumption 
How much reagents per bite
crafted_food_buff 
Buff given when a hand-crafted version of this item is consumed. Randomized according to crafting_complexity if not assigned.
crafting_complexity 
How exquisite the meal is. Applicable to crafted food, increasing its quality. Spans from 0 to 5.
decomp_req_handle 
Food that needs to be picked up in order to decompose.
decomp_type 
What our food decomposes into.
decomposition_particles 
Used to set decomposition stink particles for food, will have no particles if null
decomposition_time 
Used to set custom decomposition times for food. Set to 0 to have it automatically set via the food's flags.
eat_time 
How long it will take to eat this food without any other modifiers
eatverbs 
Verbs used when eating this food in the to_chat messages
food_flags 
Extra flags for things such as if the food is in a container or not
food_reagents 
List of reagents this food gets on creation during reaction or map spawn
foodtypes 
Bitflag of the types of food this food is made of by default (for food recipes, it depends on the ingredients)
foodtypes_added_when_cooked 
Bitflag of the types of food that have to be added when cooked
foodtypes_removed_when_cooked 
Bitflag of the types of food that have to be removed when the food is baked/microwaved/grilled/dried etc.
intrinsic_food_materials 
A list of material paths. the main material in the custom_materials list is also added on init.
If the food has materials and as long as the main one is in this list, effects and properties of materials are disabled Food is coded mainly around reagents than materials, and the two may cause some issues if overlapped. For example, this stops food normally containing meat from having redundant prefixes, an unfitting appearance and too much meatiness overall. However, the same material effects will apply on a fruit or a vegetable.
junkiness 
How much junkiness this food has? God I should remove junkiness soon
max_volume 
Amount of volume the food can contain
preserved_food 
Food that's immune to decomposition.
starting_reagent_purity 
Used to set custom starting reagent purity for synthetic and natural food. Ignored when set to null.
tastes 
Tastes to describe this food
trash_type 
Type of atom thats spawned after eating this item
venue_value 
Price of this food if sold in a venue
Proc Details
make_bakeable
This proc handles bakeable components, overwrite if you want different bake results etc.
make_dryable
This proc handles the dryable element. Overwrite if you want special drying rack results.
make_edible
This proc adds the edible component, overwrite this if you for some reason want to change some specific args like callbacks.
make_germ_sensitive
This proc makes things infective and decomposing when they stay on the floor for too long. Set preserved_food to TRUE to make it never decompose. Set decomp_req_handle to TRUE to only make it decompose when someone picks it up. Requires /datum/component/germ_sensitive to detect exposure
make_grillable
This proc handles grillable components, overwrite if you want different grill results etc.
make_leave_trash
This proc handles trash components, overwrite this if you want the object to spawn trash
make_microwaveable
This proc handles the microwavable element. Overwrite if you want special microwave results. By default, all food is microwavable. However, they will be microwaved into a bad recipe (burnt mess).
make_processable
This proc handles processable elements, overwrite this if you want to add behavior such as slicing, forking, spooning, whatever, to turn the item into something else
pass_down_foodtypes
Proc called when the food is cooked (and the result is obviously still food)
This proc handles passing down the foodtype flags of the source to the result, usually because it has been cooked. This way we can preserve the food types of the ingredients this dish is made of. Crafting and processing are handled separately.
Oh by the by, if you want to have foodtypes added/removed for a specific cooking method, then you should override the signal proc for that cooking method and call this proc but with 'added_foodtypes' and 'removed_foodtypes' args set to the wanted values in the proccall