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

            if (!Empty)
            {
                if (Finished)
                {
                    stringBuilder.AppendLine("SRV_ContainsCharcoal".Translate(new object[]
                    {
                        (int)(woodCount * CharcoalPerWoodLog),
                        (int)(MaxCapacity * CharcoalPerWoodLog)
                    }));
                    stringBuilder.AppendLine("SRV_Charred".Translate());
                }
                else
                {
                    stringBuilder.AppendLine("SRV_ContainsWood".Translate(new object[]
                    {
                        woodCount,
                        MaxCapacity
                    }));
                    stringBuilder.Append("FermentationProgress".Translate(new object[]
                    {
                        Progress.ToStringPercent(),
                        EstimatedTicksLeft.ToStringTicksToPeriod(true, false, true)
                    }));
                }
            }
            ;
            return(stringBuilder.ToString().TrimEndNewlines());
        }
예제 #2
0
        public override string GetProcessingString()
        {
            StringBuilder           stringBuilder = new StringBuilder();
            CompTemperatureRuinable tempRuinable  = GetComp <CompTemperatureRuinable>();

            if (!Empty && (tempRuinable == null || !tempRuinable.Ruined))
            {
                string contentsLabel = Completed ? CompFermenting.ProductDef.label : CompFermenting.IngredientLabel;
                stringBuilder.AppendLine("FermentingBuildingContainsSomething".Translate(new object[]
                {
                    contentsCount,
                    Capacity,
                    contentsLabel
                }));
            }
            if (!Empty)
            {
                if (Completed)
                {
                    stringBuilder.AppendLine(ProcessedLabel.Translate());
                }
                else
                {
                    stringBuilder.AppendLine("FermentationProgress".Translate(new object[]
                    {
                        Progress.ToStringPercent(),
                        EstimatedTicksLeft.ToStringTicksToPeriod()
                    }));
                    if (CurrentTempProgressSpeedFactor != 1f)
                    {
                        stringBuilder.Append(OutOfIdealTemperatureLabel);
                        stringBuilder.AppendLine(CurrentTempProgressSpeedFactor.ToStringPercent());
                    }
                }
            }
            stringBuilder.AppendLine("Temperature".Translate() + ": " + AmbientTemperature.ToStringTemperature("F0"));
            if (tempRuinable == null)
            {
                stringBuilder.AppendLine(string.Concat(new string[]
                {
                    CompFermenting.IdealTempLabel,
                    ": >",
                    MinIdealTemperature.ToStringTemperature("F0")
                }));
            }
            else
            {
                stringBuilder.AppendLine(string.Concat(new string[]
                {
                    CompFermenting.IdealTempLabel,
                    ": ",
                    MinIdealTemperature.ToStringTemperature("F0"),
                    " ~ ",
                    tempRuinable.Props.maxSafeTemperature.ToStringTemperature("F0")
                }));
            }
            return(stringBuilder.ToString().TrimEndNewlines());
        }
 public string TimeLeft()
 {
     if (EstimatedTicksLeft >= 0)
     {
         return(EstimatedTicksLeft.ToStringTicksToPeriod() + " left");
     }
     else
     {
         return("stopped");
     }
 }