Dig When Hungry - AndroidQuazar/VanillaExpandedFramework GitHub Wiki
CompDigWhenHungry allows an animal to dig in the ground for a given resource, but only when hungry. A list of accepted terrain defNames can be specified
//Similar to CompProperties_DigPeriodically, but only when hungry
public string customThingToDig = "";
public int customAmountToDig = 1;
//A list of extra things that can be dug up
public List<string> customThingsToDig = null;
//A corresponding list of amounts of extra things that can be dug up, will default to customAmountToDig if not set.
public List<int> customAmountsToDig = null;
//timeToDig has a misleading name. It is a minimum counter. The user will not dig if less than timeToDig ticks have passed.
//This is done to avoid an animal digging again if it's still hungry.
public int timeToDig = 40000;
//A list of acceptable terrains can be specified
public List<string> acceptedTerrains = null;
//Should items be spawned forbidden?
public bool spawnForbidden = false;
//Should the animal dig for items even if it's not hungry, every timeToDigForced ticks?
public bool digAnywayEveryXTicks = true;
public int timeToDigForced = 120000;
//Frostmites dig for dead wildmen
public bool isFrostmite = false;
//Dig only if during growing season
public bool digOnlyOnGrowingSeason = false;
public int minTemperature = 0;
public int maxTemperature = 58;
It is a comp class, so you just add it in XML in the <comps>
tag. For example, this allows Penguins in Vanilla Animals Expanded - Ice Sheet to dig for fish:
<comps>
<li Class="AnimalBehaviours.CompProperties_DigWhenHungry">
<customThingToDig>AEXP_RawFish</customThingToDig>
<customAmountToDig>10</customAmountToDig>
</li>
</comps>