protected override void Inspect(Vessel vessel) { if (vessel == null) { totalMass = 0.0; heatshieldTemp = 0.0; } else { // mass totalMass = vessel.GetTotalMass(); // heat shields heatshieldTemp = Constants.MIN_TEMP; foreach (Part p in heatshieldParts) { if (p.skinTemperature > heatshieldTemp) { heatshieldTemp = p.skinTemperature; } } // drills drillTemp = Constants.MIN_TEMP; foreach (Part p in drillParts) { if (p.temperature > drillTemp) { drillTemp = p.temperature; } } // landing gears this.landingGearState = InspectLandingGear(); // brakes this.brakeState = InspectBrakes(); // air brakes this.airBrakeState = InspectAirBrakes(); // flaps this.flapState = InspectFlaps(); // wheels this.wheelState = InspectWheelDamage(); } }
public override void Reset() { this.drillParts.Clear(); this.drillInstalled = false; this.heatshieldParts.Clear(); this.wheelBrakes.Clear(); this.airBrakes.Clear(); this.wheelDeployment.Clear(); this.wheelDamage.Clear(); this.flaps.Clear(); this.totalMass = 0.0; this.dragCoefficent = 0.0; this.heatshieldTemp = 0.0; this.heatshieldInstalled = false; this.landingGearState = GEARSTATES.NOT_INSTALLED; this.brakeState = BRAKESTATES.NOT_INSTALLED; this.airBrakeState = BRAKESTATES.NOT_INSTALLED; this.flapState = FPLAPSTATES.NOT_INSTALLED; this.wheelState = WHEELDAMAGE.NOT_INSTALLED; }