Corpse Decayer - AndroidQuazar/VanillaExpandedFramework GitHub Wiki
CompCorpseDecayer makes an animal detect nearby corpses and increase its hunger meter by decaying them, rotting them in the process
//A comp class to make a creature feed on nearby corpses, making it recover its hunger
//and rotting the corpses
public int radius = 5;
public int tickInterval = 500;
public int decayOnHitPoints = 1;
public float nutritionGained = 0.2f;
public string corpseSound = "";
It is a comp class, so you just add it in XML in the <comps>
tag. For example, this allows Helixien slugs in Alpha Animals to rot corpses and feed on them
<comps>
<li Class="AnimalBehaviours.CompProperties_CorpseDecayer">
<radius>5</radius>
<tickInterval>500</tickInterval>
<decayOnHitPoints>2</decayOnHitPoints>
<nutritionGained>0.1</nutritionGained>
<corpseSound>AA_HelixienCorpseSound</corpseSound>
</li>
</comps>