Example #1
0
        private static void WriteChargeModeValue(MyBatteryBlock block, StringBuilder writeTo)
        {
            switch (block.ChargeMode)
            {
            case Sandbox.ModAPI.Ingame.ChargeMode.Auto:
                writeTo.AppendStringBuilder(MyTexts.Get(MySpaceTexts.BlockPropertyTitle_Auto));
                return;

            case Sandbox.ModAPI.Ingame.ChargeMode.Recharge:
                writeTo.AppendStringBuilder(MyTexts.Get(MySpaceTexts.BlockPropertyTitle_Recharge));
                return;

            case Sandbox.ModAPI.Ingame.ChargeMode.Discharge:
                writeTo.AppendStringBuilder(MyTexts.Get(MySpaceTexts.BlockPropertyTitle_Discharge));
                return;
            }
            throw new ArgumentOutOfRangeException();
        }
Example #2
0
 public MySyncBatteryBlock(MyBatteryBlock batteryBlock)
 {
     m_batteryBlock = batteryBlock;
 }
 public MySyncBatteryBlock(MyBatteryBlock batteryBlock)
 {
     m_batteryBlock = batteryBlock;
 }
Example #4
0
 private static void OnRechargeToggle(MyBatteryBlock block)
 {
     block.OnlyRecharge = !block.OnlyRecharge;
 }
Example #5
0
 private static void OnAutoEnabled(MyBatteryBlock block)
 {
     block.ChargeMode = Sandbox.ModAPI.Ingame.ChargeMode.Auto;
 }
 public BatteryWrapper( MySlimBlock block )
     : base(block)
 {
     Block = (MyBatteryBlock)block.FatBlock;
 }