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(); }
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(); }
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(); }