public Thrusters(IMyTerminalBlock referenceBlock, List <IMyTerminalBlock> blocks) : base(referenceBlock) { UpdateThrusters(blocks); Dictionary <VRageMath.Vector3, List <IMyThrust> > .ValueCollection.Enumerator enumerator = thrusterBlocks.Values.GetEnumerator(); enumerator.MoveNext(); IMyThrust thrust = enumerator.Current[0]; MinAcceleration = thrust.GetMininum <float>("Override"); MaxAcceleration = thrust.GetMaximum <float>("Override"); DefaultAcceleration = thrust.GetDefaultValue <float>("Override"); }
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")); } } }