kaptain-kavern / CK_AnimalPlant_Pack

This mod alter the tropical rainforest biome : it add a significant amount of new animals and plants to the game and increase fauna and flora diversity.
https://ludeon.com/forums/index.php?topic=33296
6 stars 4 forks source link

Seasons #30

Open lpCoercion opened 8 years ago

lpCoercion commented 8 years ago

If we need to use C# for the seasons, we should only do it to the extent needed. setting up a season cycle that can be manipulated in xml or something? I still think we need to keep our defs and texture assignments in xml if possible (like vanilla does).

According to dingo, this may not be too easy.

This is the current code that changes the plants to lose leaves:

in PlantProperties (<plant>)

        public void PostLoadSpecial(ThingDef parentDef)
        {
            if (!this.leaflessGraphicPath.NullOrEmpty())
            {
                LongEventHandler.ExecuteWhenFinished(delegate
                {
                    this.leaflessGraphic = GraphicDatabase.Get(parentDef.graphicData.graphicClass, this.leaflessGraphicPath, parentDef.graphic.Shader, parentDef.graphicData.drawSize, parentDef.graphicData.color, parentDef.graphicData.colorTwo);
                });
            }
        }