Disease Immunity - AndroidQuazar/VanillaExpandedFramework GitHub Wiki

CompDiseaseImmunity allows an animal to recover from any diseases specified in a list. Those hediffs get deleted every tickInterval

    //Makes the animal automatically heal a disease when he is afflicted by it

    public List<string> hediffsToRemove = null;

    public int tickInterval = 250;

How do I use this code?

It is a comp class, so you just add it in XML in the <comps> tag. For example, this allows an animal to be unaffected by Plague, Flu, and the Spores in Alpha Biomes:

<comps>
	<li Class="AnimalBehaviours.CompProperties_DiseaseImmunity">
		<hediffsToRemove>
			<li>Animal_Plague</li>
			<li>Animal_Flu</li>
			<li>AB_AnimalSporesAllergy</li>
		</hediffsToRemove>
		<tickInterval>2000</tickInterval>
	</li>
</comps>
⚠️ **GitHub.com Fallback** ⚠️