Ejemplo n.º 1
0
        public override void PostExposeData()
        {
            base.PostExposeData();
            Scribe_Values.Look <float>(ref this.storedEnergy, "storedPower", 0f, false);
            CompProperties_PipeTank props = this.Props;

            if (this.storedEnergy > props.storedEnergyMax)
            {
                this.storedEnergy = props.storedEnergyMax;
            }
        }
Ejemplo n.º 2
0
        public override string CompInspectStringExtra()
        {
            CompProperties_PipeTank props = this.Props;
            string text = string.Concat(new string[]
            {
                "BR_LiquidTankStored".Translate(),
                ": ",
                this.storedEnergy.ToString("F0"),
                " / ",
                props.storedEnergyMax.ToString("F0"),
                " ml-d"
            });
            string text2 = text;

            text = string.Concat(new string[]
            {
                text2,
                "\n",
                "BR_LiquidTankEfficiency".Translate(),
                ": ",
                (props.efficiency * 100f).ToString("F0"),
                "%"
            });
            if (this.storedEnergy > 0f)
            {
                text2 = text;
                text  = string.Concat(new string[]
                {
                    text2,
                    "\n",
                    "BR_TankLeakage".Translate(),
                    ": ",
                    5f.ToString("F0"),
                    " ml"
                });
            }
            return(text + "\n" + base.CompInspectStringExtra());
        }