Gas Producer - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki

<- Back

CompGasProducer makes an animal spawn a cloud of gas around it. WARNING: this is a laggy class, since gasses in RimWorld are laggy. Use sparingly.

        //A laggy comp class that allows an animal to release gases around it

        //It is laggy because too much gas particles in RimWorld are laggy, not by itself

        public string gasType = "";
        public float rate = 0f;
        public int radius = 0;
        public bool generateIfDowned = false;

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 Ocular Jellies in Alpha Animals to spawn Ocular Gas around them

<comps>
	<li Class="VEF.AnimalBehaviours.CompProperties_GasProducer">
		<gasType>AA_OcularGas</gasType>
		<rate>0.5</rate>
		<radius>2</radius>
	</li>
</comps>
⚠️ **GitHub.com Fallback** ⚠️