public override string CompInspectStringExtra() { string text = Props.FuelLabel + ": " + fuel.ToStringDecimalIfSmall() + " / " + Props.fuelCapacity.ToStringDecimalIfSmall(); if (!Props.consumeFuelOnlyWhenUsed && HasFuel) { int numTicks = (int)(fuel / Props.fuelConsumptionRate * 60000f); text = text + " (" + numTicks.ToStringTicksToPeriod() + ")"; } if (!HasFuel && !Props.outOfFuelMessage.NullOrEmpty()) { text += $"\n{Props.outOfFuelMessage} ({GetFuelCountToFullyRefuel()}x {Props.fuelFilter.AnyAllowedDef.label})"; } if (Props.targetFuelLevelConfigurable) { text += "\n" + "ConfiguredTargetFuelLevel".Translate(TargetFuelLevel.ToStringDecimalIfSmall()); } return(text); }
public override string CompInspectStringExtra() { string str = Props.FuelLabel + ": " + Fuel.ToStringDecimalIfSmall() + " / " + Props.fuelCapacity.ToStringDecimalIfSmall(); if (!Props.consumeFuelOnlyWhenUsed && HasFuel) { float daysRemaining = Fuel / RealFuelConsumeRate; int ticksRemaining = (int)(daysRemaining * 60000); str = str + " (" + ticksRemaining.ToStringTicksToPeriod() + ")"; } if (!HasFuel && !Props.outOfFuelMessage.NullOrEmpty()) { str += $"\n{Props.outOfFuelMessage} ({GetFuelCountToFullyRefuel()}x {Props.fuelFilter.AnyAllowedDef.label})"; } if (Props.targetFuelLevelConfigurable) { str = str + ("\n" + "ConfiguredTargetFuelLevel".Translate(TargetFuelLevel.ToStringDecimalIfSmall())); } return(str); }