public override void PostExposeData() { base.PostExposeData(); Scribe_Values.Look <float>(ref this.storedWater, "storedWater", 0f, false); Scribe_Values.Look(ref this.leakRate, "leakRate", 1f); Scribe_Values.Look(ref this.lastRepairTick, "lastRepairTick", 1f); CompProperties_WaterTank props = this.Props; if (this.storedWater > props.storedWaterMax) { this.storedWater = props.storedWaterMax; } }
public override string CompInspectStringExtra() { CompProperties_WaterTank props = this.Props; string text = string.Concat(new string[] { "PowerBatteryStored".Translate(), ": ", this.storedWater.ToString("F0"), " / ", props.storedWaterMax.ToString("F0"), " L" }); string text2 = text; text = string.Concat(new string[] { text2, "\n", "PowerBatteryEfficiency".Translate(), ": ", (props.efficiency * 100f).ToString("F0"), "%" }); if (this.storedWater > 0f) { text2 = text; text = string.Concat(new string[] { text2, "\n", "Estate_WaterLeakRate".Translate(), ": ", LeakRate.ToString("F0"), "%" }); } return(text + "\n" + base.CompInspectStringExtra()); }