void PowerTemp_SetPower(object sender, PowerTempControl.ValueEventArgs e)
        {
            if (InspectedSystem.Essential && e.Value < InspectedSystem.MinimumPower)
             {
                 SetDesiredPower(InspectedSystem.MinimumPower);
                 return;
             }

             if (e.Value == InspectedSystem.DesiredPower)
                 return;

             if (SetPower != null)
                 SetPower(this, e);

             DoUpdate();
        }
Esempio n. 2
0
        void inspector_SetPower(object sender, PowerTempControl.ValueEventArgs e)
        {
            ShipSystemInspector inspector = sender as ShipSystemInspector;
            if (inspector == null || inspector.InspectedSystem == null)
                return;

            lock (Ship)
                Ship.SetSystemDesiredPower(inspector.InspectedSystem, e.Value);
        }
        void PowerTemp_SetCoolant(object sender, PowerTempControl.ValueEventArgs e)
        {
            if (e.Value == InspectedSystem.DesiredCoolantFlow)
                return;

            if (SetCoolant != null)
                SetCoolant(this, e);

            DoUpdate();
        }
Esempio n. 4
0
        void inspector_Activate(object sender, PowerTempControl.ValueEventArgs e)
        {
            ShipSystemInspector inspector = sender as ShipSystemInspector;
            if (inspector == null || inspector.InspectedSystem == null)
                return;

            lock (Ship)
                inspector.InspectedSystem.Activate();
        }