You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -18,6 +18,7 @@ public class MicroEngineerMod : BaseSpaceWarpPlugin
18
18
{
19
19
privatebool_showGuiFlight;
20
20
privatebool_showGuiOAB;
21
+
privatebool_showGuiSettingsOAB;
21
22
22
23
#region Editing window
23
24
privateboolshowEditWindow=false;
@@ -47,6 +48,8 @@ public class MicroEngineerMod : BaseSpaceWarpPlugin
47
48
// If game input is enabled or disabled (used for locking controls when user is editing a text field
48
49
privatebool_gameInputState=true;
49
50
51
+
privatefloat_lastUpdate=0;
52
+
50
53
publicoverridevoidOnInitialized()
51
54
{
52
55
MicroStyles.InitializeStyles();
@@ -58,18 +61,7 @@ public override void OnInitialized()
58
61
// Load window positions and states from disk, if file exists
59
62
MicroUtility.LoadLayout(MicroWindows);
60
63
61
-
// Preserve backward compatibility with 0.6.0. If user previously saved the layout and then upgraded without deleting the original folder, then StageInfoOAB window will be wiped by LoadLayout(). So, we add it manually now.
Logger.LogInfo("Space Warp older version detected. Loading old MicroStyles.");
69
-
MicroStyles.SetStylesForOldSpaceWarpSkin();
70
-
}
71
-
else
72
-
Logger.LogInfo("Space Warp new version detected. Loading new MicroStyles.");
64
+
BackwardCompatibilityInitializations();
73
65
74
66
// Register Flight and OAB buttons
75
67
Appbar.RegisterAppButton(
@@ -95,6 +87,30 @@ public override void OnInitialized()
95
87
});
96
88
}
97
89
90
+
privatevoidBackwardCompatibilityInitializations()
91
+
{
92
+
// Preserve backward compatibility with 0.6.0. If user previously saved the layout and then upgraded without deleting the original folder, then StageInfoOAB window will be wiped by LoadLayout(). So, we add it manually now.
Logger.LogInfo("Space Warp older version detected. Loading old MicroStyles.");
100
+
MicroStyles.SetStylesForOldSpaceWarpSkin();
101
+
}
102
+
else
103
+
Logger.LogInfo("Space Warp new version detected. Loading new MicroStyles.");
104
+
105
+
// Preserve backward compatibility with 0.7.2. If user previously saved the layout and then upgraded without deleting the original folder, then the Torque entry won't be in the loaded StageOAB window. So, we add it manually now.
torqueEntry.IsActive=GUILayout.Toggle(torqueEntry.IsActive,"Display Torque (experimental)\nTurn on CoT & CoM for this",MicroStyles.SectionToggleStyle);
Copy file name to clipboardExpand all lines: MicroEngineerProject/MicroEngineer/MicroEntries.cs
+62Lines changed: 62 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1354,6 +1354,68 @@ public override string ValueDisplay
1354
1354
}
1355
1355
}
1356
1356
1357
+
/// <summary>
1358
+
/// Calculates torque from the Center of Thrust and Center of Mass
1359
+
/// </summary>
1360
+
publicclassTorque:MicroEntry
1361
+
{
1362
+
[JsonProperty]
1363
+
internalboolIsActive=false;
1364
+
1365
+
publicTorque()
1366
+
{
1367
+
Name="Torque";
1368
+
Description="Thrust torque that is generated by not having Thrust Vector and Center of Mass aligned. Turn on the Center of Thrust and Center of Mass VAB indicators to get an accurate value.";
0 commit comments