Building: Food and Drinks
They should also have a taste attribute, which is a simple string which describes to the consumer what an item tastes like when they eat/drink/taste it. taste attributes may be stated, if you wanted such a thing (see eggday_egg_1 for an example).
Setting the empty attribute of a consumable to be an object causes that object to appear when the consumable is eaten/drunk. If the consumable is a clone, its empty will be a clone. If the consumable is a real object, its empty will be too, unless the empty belongs to the template zone in which case it is cloned. Empties will be peel or wrappers for solid foods, and glasses or bottles for fluids.
You can set consume and after_consume traps on consumable objects, called when the object is eaten or drunk.
See also objects.
Fluids
Drinks are defined as an unpackaged liquid template. Magic is done on purchase or reset to fill a container (see the liquids devdoc for more info).Liquid templates have a couple of useful properties right now:
- shop.default_container, which defines the container object that shopkeepers will serve the fluid in when it is sold, and
- cost.per_litre which will be used along with the above to calculate the cost of the item automatically.
Containers should always be treatas template_empty_1 for correct descriptive text. They should also have a volume attribute and, if you don't want them to be served full to the brim, a shop.default_serving attribute to define their initial fill level. You should also give empties the WaterTight and Container flags.
Set abv on the liquid template to the alcohol by volume of it (out of 10000), so for example, beer might be 400.
See also liquids.