public override string GetInspectString()
        {
            var stringBuilder = new StringBuilder();

            if (LifeStage == PlantLifeStage.Growing)
            {
                stringBuilder.AppendLine("PercentGrowth".Translate(new object[]
                {
                    GrowthPercentString
                }));
                stringBuilder.AppendLine("GrowthRate".Translate() + ": " + GrowthRate.ToStringPercent());
                if (Resting)
                {
                    stringBuilder.AppendLine("PlantResting".Translate());
                }
                if (!HasEnoughLightToGrow)
                {
                    stringBuilder.AppendLine("PlantNeedsLightLevel".Translate() + ": " + growMinGlow.ToStringPercent());
                }
            }
            else if (LifeStage == PlantLifeStage.Mature)
            {
                stringBuilder.AppendLine("Mature".Translate());
            }
            return(stringBuilder.ToString().TrimEndNewlines());
        }
Esempio n. 2
0
        public override string GetInspectString()
        {
            var sb = new StringBuilder();

            if (LifeStage == PlantLifeStage.Growing)
            {
                sb.AppendLine("PercentGrowth".Translate(GrowthPercentString));
                sb.AppendLine("GrowthRate".Translate() + ": " + GrowthRate.ToStringPercent());

                if (!Blighted)
                {
                    if (Resting)
                    {
                        sb.AppendLine("PlantResting".Translate());
                    }

                    if (!HasEnoughLightToGrow)
                    {
                        sb.AppendLine("PlantNeedsLightLevel".Translate() + ": " + def.plant.growMinGlow.ToStringPercent());
                    }

                    float tempFactor = GrowthRateFactor_Temperature;
                    if (tempFactor < 0.99f)
                    {
                        if (tempFactor < 0.01f)
                        {
                            sb.AppendLine("OutOfIdealTemperatureRangeNotGrowing".Translate());
                        }
                        else
                        {
                            sb.AppendLine("OutOfIdealTemperatureRange".Translate(Mathf.RoundToInt(tempFactor * 100f).ToString()));
                        }
                    }
                }
            }
            else if (LifeStage == PlantLifeStage.Mature)
            {
                if (HarvestableNow)
                {
                    sb.AppendLine("ReadyToHarvest".Translate());
                }
                else
                {
                    sb.AppendLine("Mature".Translate());
                }
            }

            if (DyingBecauseExposedToLight)
            {
                sb.AppendLine("DyingBecauseExposedToLight".Translate());
            }

            if (Blighted)
            {
                sb.AppendLine("Blighted".Translate() + " (" + Blight.Severity.ToStringPercent() + ")");
            }

            return(sb.ToString().TrimEndNewlines());
        }
        public override string GetInspectString()
        {
            StringBuilder stringBuilder = new StringBuilder();

            if (LifeStage == PlantLifeStage.Growing)
            {
                stringBuilder.AppendLine("PercentGrowth".Translate(new object[]
                {
                    GrowthPercentString
                }));
                stringBuilder.AppendLine("GrowthRate".Translate() + ": " + GrowthRate.ToStringPercent());
                if (Resting)
                {
                    stringBuilder.AppendLine("PlantResting".Translate());
                }
                if (!HasEnoughLightToGrow)
                {
                    stringBuilder.AppendLine("PlantNeedsLightLevel".Translate() + ": " + this.def.plant.growMinGlow.ToStringPercent());
                }
                float growthRateFactor_Temperature = HardyGrowthRateFactor_Temperature;
                if (growthRateFactor_Temperature < 0.99f)
                {
                    if (growthRateFactor_Temperature < 0.01f)
                    {
                        stringBuilder.AppendLine("OutOfIdealTemperatureRangeNotGrowing".Translate());
                    }
                    else
                    {
                        stringBuilder.AppendLine("OutOfIdealTemperatureRange".Translate(new object[]
                        {
                            Mathf.RoundToInt(growthRateFactor_Temperature * 100f).ToString()
                        }));
                    }
                }
            }
            else if (LifeStage == PlantLifeStage.Mature)
            {
                if (def.plant.Harvestable)
                {
                    stringBuilder.AppendLine("ReadyToHarvest".Translate());
                }
                else
                {
                    stringBuilder.AppendLine("Mature".Translate());
                }
            }
            return(stringBuilder.ToString().TrimEndNewlines());
        }
Esempio n. 4
0
        public override string GetInspectString()
        {
            StringBuilder stringBuilder = new StringBuilder();

            if (DebugSettings.godMode)
            {
                stringBuilder.AppendLine("Size: " + size.ToStringPercent());
                stringBuilder.AppendLine("Growth rate: " + GrowthRate.ToStringPercent());
                float propSubmerged = 1 - submersibleFactor();
                if (propSubmerged > 0)
                {
                    stringBuilder.AppendLine("Submerged: " + propSubmerged.ToStringPercent());
                }
                foreach (growthRateModifier mod in attributes.allRateModifiers)
                {
                    stringBuilder.AppendLine(mod.GetType().Name + ": " + attributes.growthRateFactor(mod, getModValue(mod)));
                }
            }
            return(stringBuilder.ToString().TrimEndNewlines());
        }
Esempio n. 5
0
        public override string GetInspectString()
        {
            StringBuilder stringBuilder = new StringBuilder();

            if (LifeStage == PlantLifeStage.Growing)
            {
                stringBuilder.AppendLine("PercentGrowth".Translate(new object[]
                {
                    GrowthPercentString
                }));

                // Append secondary growth info
                if (Sec_HarvestableNow)
                {
                    stringBuilder.AppendLine(thingLabel + " " + "ReadyToHarvest".Translate().ToLower());
                }
                else
                {
                    if (GrowsThisSeason)
                    {
                        stringBuilder.AppendLine(thingLabel + " " + "PercentGrowth".Translate(new object[]
                        {
                            Sec_GrowthPercentString
                        }));
                    }
                    else
                    {
                        stringBuilder.AppendLine(thingLabel + " " + Static.ReportBadSeason);
                    }
                }

                stringBuilder.AppendLine("GrowthRate".Translate() + ": " + GrowthRate.ToStringPercent());
                if (Resting)
                {
                    stringBuilder.AppendLine("PlantResting".Translate());
                }
                if (!HasEnoughLightToGrow)
                {
                    stringBuilder.AppendLine("PlantNeedsLightLevel".Translate() + ": " + def.plant.growMinGlow.ToStringPercent());
                }
                float growthRateFactor_Temperature = GrowthRateFactor_Temperature;
                if (growthRateFactor_Temperature < 0.99f)
                {
                    if (growthRateFactor_Temperature < 0.01f)
                    {
                        stringBuilder.AppendLine("OutOfIdealTemperatureRangeNotGrowing".Translate());
                    }
                    else
                    {
                        stringBuilder.AppendLine("OutOfIdealTemperatureRange".Translate(new object[]
                        {
                            Mathf.RoundToInt(growthRateFactor_Temperature * 100f).ToString()
                        }));
                    }
                }
            }
            else if (LifeStage == PlantLifeStage.Mature)
            {
                if (def.plant.Harvestable)
                {
                    stringBuilder.AppendLine("ReadyToHarvest".Translate());
                }
                else
                {
                    stringBuilder.AppendLine("Mature".Translate());
                }

                // Append secondary growth info
                if (Sec_HarvestableNow)
                {
                    stringBuilder.AppendLine(thingLabel + " " + "ReadyToHarvest".Translate().ToLower());
                }
                else
                {
                    if (GrowsThisSeason)
                    {
                        stringBuilder.AppendLine(thingLabel + " " + "PercentGrowth".Translate(new object[]
                        {
                            Sec_GrowthPercentString
                        }));
                    }
                    else
                    {
                        stringBuilder.AppendLine(thingLabel + " " + Static.ReportBadSeason);
                    }
                }
            }
            return(stringBuilder.ToString().TrimEndNewlines());
        }