void ThrusterOverride() { if (forwardThrusters.Count == 0) { Echo("No forward thrust found"); } GridTerminalSystem.SearchBlocksOfName(forwardThrustName, forwardThrusters); for (int i = 0; i < forwardThrusters.Count; i++) { IMyThrust Thrust = forwardThrusters[i] as IMyThrust; Thrust.ApplyAction("OnOff_On"); Thrust.SetValue <float>("Override", float.MaxValue); } }
public void StopAcceleration() { for (int i = 0; i < directions.Count; ++i) { var key = directions[i]; if (!thrusters.ContainsKey(key)) { continue; } var list = thrusters[key]; for (int j = 0; j < list.Count; ++j) { IMyThrust thruster = list[j]; thruster.SetValue("Override", thruster.GetDefaultValue <float>("Override")); } } }