Exemplo n.º 1
0
        public static void SetGrowthMultiplier(this Plant plant, float newValue)
        {
            GrowthDataEntry growthDataEntry = GrowthData.GetOrCreateValue(plant);

            growthDataEntry.Multiplier = newValue;
            growthDataEntry.lastUpdate = Find.TickManager.TicksGame;
        }
Exemplo n.º 2
0
        public static float GetGrowthMultiplier(this Plant plant)
        {
            GrowthDataEntry growthDataEntry = GrowthData.GetOrCreateValue(plant);

            if (growthDataEntry.lastUpdate < Find.TickManager.TicksGame - 4000)             // never was in group or lost its group
            {
                return(1f);
            }
            return(growthDataEntry.Multiplier);
        }