Eater

This component allows your prefab to eat edible items.

Component Eater Fields

TypeNameDescription
booleanstrongstomachwhether the eater takes damage from poison.
booleanignoresspoilagewhether the eater takes spoilage penalties.
tablefoodprefscontains strings; all foodtypes that can be consumed
functiononeatfnFires when feasting. Args: inst, food
GetTime()lasteattimeCheck when your prefab last ate. By subtracting this from the current GetTime(), you get the time without food.
functioncaneattestFurther limit what your prefab can eat. Args: inst, food

Component Eater Events

NameDataFires in/when...
oneatfoodEat (before oneatfn fires or the food item gets removed)
oneatsomethingfoodEat (after everything else in that function)

Component Eater Foodtypes

NameDescriptionExample
GENERICFoods without certain flavour or content.Wet Goop
VEGGIEVegetables and fruitsBerries
MEATMeat of any definition, which also makes bunnymen angry.Morsel
INSECTDoesn't seem to be usednone
SEEDSUsed by birdsSeeds
WOODUsed by werebeaverLog
ELEMENTALMinerals and stone, used by cave lobsters.Nitre
HORRIBLEThings that are not meant to be eaten by anything civilized.Pigskin
These are standards, you can make one up if you want to.

Example