Winter Blooming Extension - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki

<- Back

WinterBloomingExtension allows you to change the graphic of the plant come winter.

        public GraphicData graphicSowing;
        public GraphicData graphicWinter;

How do I use this code?

This extension will only work for plants with the VEF.Plants.Plant_WinterBlooming class, you need to put this in the <thingClass> tag of the plant's def.

Def Extensions are added to the <modExtensions> tag of the ThingDef of the plant you want to add them to.

If you aren't sure if the def ALREADY has an extension (for example, if you think another mod will add their own), always use XPATH (xml patching) to add an extension, as there is already a PatchOperationAddModExtension to ensure they don't collide.

For example, this would turn the plant (visually) into an apple tree during winter:

<modExtensions>
	<li Class="VEF.Plants.WinterBloomingExtension">
		<graphicWinter>
			<texPath>Things/Plant/Trees/VCE_TreeApple</texPath>
			<graphicClass>Graphic_Random</graphicClass>
			<shadowData>
				<volume>(0.15, 0.3, 0.15)</volume>
				<offset>(0,0,-0.38)</offset>
			</shadowData>
		</graphicWinter>		
	</li>
</modExtensions>
⚠️ **GitHub.com Fallback** ⚠️