Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- E:/gama/kspmodz/TweakableEverything-1.9.1/Source/TweakableReactionWheels/ModuleTweakableReactionWheel.cs Fri May 01 14:46:02 2015
- +++ C:/Users/jazzkutya/Documents/Projects/TweakableReactionWheels/TweakableReactionWheels/ModuleTweakableReactionWheel.cs Sun May 03 20:22:14 2015
- @@ -66,6 +66,11 @@
- [UI_FloatRange(minValue = float.MinValue, maxValue = float.MaxValue, stepIncrement = 1f)]
- public float YawTorque;
- + // Stores our value for yaw torque gain.
- + [KSPField(isPersistant = true, guiName = "T. Gain pct", guiActive = true)]
- + [UI_FloatRange(minValue = 0f, maxValue = 100f, stepIncrement = 1f)]
- + public float TorqueGain;
- +
- // Construct ALL the objects.
- public ModuleTweakableReactionWheel()
- {
- @@ -76,6 +81,7 @@
- this.RollTorque = -1;
- this.PitchTorque = -1;
- this.YawTorque = -1;
- + this.TorqueGain = 100f;
- }
- // Runs on start.
- @@ -144,6 +150,11 @@
- this.reactionWheelModule.State = ModuleReactionWheel.WheelState.Disabled;
- }
- }
- + }
- + if (HighLogic.LoadedSceneIsFlight && this.reactionWheelModule != null) {
- + this.reactionWheelModule.RollTorque = this.RollTorque*this.TorqueGain/100f;
- + this.reactionWheelModule.PitchTorque = this.PitchTorque*this.TorqueGain/100f;
- + this.reactionWheelModule.YawTorque = this.YawTorque*this.TorqueGain/100f;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement