diff --git a/.gitignore b/.gitignore index 006ab8f7..e90b27e5 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ bld/ [Oo]bj/ *.userprefs +InfernalRobotics/.vs/ +*.scgdat diff --git a/InfernalRobotics.version b/InfernalRobotics.version index 8f8d7e07..34b9234c 100644 --- a/InfernalRobotics.version +++ b/InfernalRobotics.version @@ -4,7 +4,7 @@ "VERSION": { "MAJOR": 2, "MINOR": 0, - "PATCH": 3 + "PATCH": 4 }, "KSP_VERSION": { "MAJOR": 1, diff --git a/InfernalRobotics/.vs/InfernalRobotics/InfernalRobotics.scgdat b/InfernalRobotics/.vs/InfernalRobotics/InfernalRobotics.scgdat index 3e3d29a1..b8a3afb8 100644 Binary files a/InfernalRobotics/.vs/InfernalRobotics/InfernalRobotics.scgdat and b/InfernalRobotics/.vs/InfernalRobotics/InfernalRobotics.scgdat differ diff --git a/InfernalRobotics/InfernalRobotics/Command/ServoController.cs b/InfernalRobotics/InfernalRobotics/Command/ServoController.cs index f561aa2f..c3ffee1d 100644 --- a/InfernalRobotics/InfernalRobotics/Command/ServoController.cs +++ b/InfernalRobotics/InfernalRobotics/Command/ServoController.cs @@ -348,13 +348,16 @@ public static void SetWheelAutoStruts(bool value, Vessel v) var activeVesselWheels = v.FindPartModulesImplementing(); foreach(var mwb in activeVesselWheels) { - mwb.autoStrut = value; if (value) { - mwb.CycleWheelStrut(); + if(!mwb.autoStrut) //we only need to Cycle once + mwb.CycleWheelStrut(); } else mwb.ReleaseWheelStrut(); + + mwb.autoStrut = value; + } } @@ -370,6 +373,9 @@ private void FixedUpdate() loadedVesselCounter = FlightGlobals.Vessels.Count(v => v.loaded); } + if (ServoGroups == null) + return; + //check if all servos stopped running and enable the struts, otherwise disable wheel autostruts var anyActive = new Dictionary(); diff --git a/InfernalRobotics/InfernalRobotics/Gui/WindowManager.cs b/InfernalRobotics/InfernalRobotics/Gui/WindowManager.cs index dc751736..28a15878 100644 --- a/InfernalRobotics/InfernalRobotics/Gui/WindowManager.cs +++ b/InfernalRobotics/InfernalRobotics/Gui/WindowManager.cs @@ -1411,6 +1411,7 @@ public void ShowServoAdvancedMode(IServo servo, bool value) { var servoToggle = servoControls.GetChild("ServoShowOtherFieldsToggle").GetComponent(); servoToggle.onValueChanged.Invoke(value); + servoToggle.isOn = value; } } public void RebuildUI() diff --git a/InfernalRobotics/InfernalRobotics/Module/ModuleIRServo.cs b/InfernalRobotics/InfernalRobotics/Module/ModuleIRServo.cs index 2d7bb480..b518438c 100644 --- a/InfernalRobotics/InfernalRobotics/Module/ModuleIRServo.cs +++ b/InfernalRobotics/InfernalRobotics/Module/ModuleIRServo.cs @@ -566,8 +566,8 @@ protected virtual void AttachToParent() if (rotateJoint) { fix.RotateAround(transform.TransformPoint(rotatePivot), transform.TransformDirection(rotateAxis), - (invertSymmetry ? ((part.symmetryCounterparts.Count != 1) ? -1 : 1) : -1) * - rotation); + //(invertSymmetry ? ((part.symmetryCounterparts.Count != 1) ? -1 : 1) : -1) * + -rotation); } else if (translateJoint) { @@ -1087,15 +1087,13 @@ protected virtual void UpdatePosition() if (joint != null) { joint.targetRotation = - Quaternion.AngleAxis( - (invertSymmetry ? ((part.symmetryCounterparts.Count != 1) ? 1 : -1) : 1)* - (rotation - rotationDelta), rotateAxis); + Quaternion.AngleAxis((rotation - rotationDelta), rotateAxis); } else if (RotateModelTransform != null) { Quaternion curRot = Quaternion.AngleAxis( - (invertSymmetry ? ((part.symmetryCounterparts.Count != 1) ? 1 : -1) : 1)* + //(invertSymmetry ? ((part.symmetryCounterparts.Count != 1) ? 1 : -1) : -1)* //obsolete rotation, rotateAxis); RotateModelTransform.localRotation = curRot; } diff --git a/InfernalRobotics/InfernalRobotics/Properties/AssemblyInfo.cs b/InfernalRobotics/InfernalRobotics/Properties/AssemblyInfo.cs index b0e657ff..c4ae9728 100644 --- a/InfernalRobotics/InfernalRobotics/Properties/AssemblyInfo.cs +++ b/InfernalRobotics/InfernalRobotics/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ [assembly: AssemblyTitle("InfernalRobotics")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] +[assembly: AssemblyCompany("MagicSmokeIndustries")] [assembly: AssemblyProduct("InfernalRobotics")] [assembly: AssemblyCopyright("Copyright © 2016")] [assembly: AssemblyTrademark("")] @@ -35,5 +35,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.0.0")] -[assembly: AssemblyFileVersion("2.0.0.0")] \ No newline at end of file +[assembly: AssemblyVersion("2.0.4.0")] +[assembly: AssemblyFileVersion("2.0.4.0")] \ No newline at end of file