This is an old revision of the document!
Foodstuff
This is not yet available in AltAway, and is documented here to help advise implementation.
Objects of type Foodstuff will have the following additional fields.
healthImpact - signed integer that is added to avatar's Health score on consumption.
hungerImpact - signed integer that is subtracted from avatar's Hunger score on consumption.
foodType - integer that has the following meaning (examples only, not yet set in stone)
0-9 | Standard foodstuff. Hamburger, Pizza, etc. |
10-19 | Fruit or Salad - may be eaten alone or added to Standard item. |
20-29 | Sauces. Ketchup, Mayonnaise, Gravy, etc. - may only be added to Standard item. |
30-39 | Condiments. Salt, Pepper, Chilli flakes, etc. - may only be added to Standard or sauces. |
40-49 | Vegetables. May be eaten raw. |
50-59 | Raw Meats - need processing, possibly alongside other items, to turn into Standard. Cannot be eaten safely. |
60-69 | Sweets/Candy - may be eaten. Might reduce hunger but also reduce health! |
Some items can be trivially combined - add ketchup to hamburger, for instance, this combines scores, adds “With ketchup” to item name.
Some items might need a cooker(crafting table) to be combined - e.g. Bread, raw ground beef to make a hamburger.
This will be decided by looking at the foodType and comparing to a rules table.
Poisons can be accommodated by having a very negative healthImpact.
Might need to implement a weight/quantity field and usualDosage field (you wouldn't expect to have to buy a fresh bottle of ketchup for every hamburger.)