Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

Commit ea55437

Browse files
committed
Fix UniversalTime entries for KSP2 0.1.4
1 parent 17e9438 commit ea55437

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

MicroEngineerProject/MicroEngineer.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
</PropertyGroup>
1010
<ItemGroup>
1111
<PackageReference Include="BepInEx.BaseLib" Version="5.4.21" Publicize="true" />
12-
<PackageReference Include="SpaceWarp" Version="1.4.0"/>
13-
<PackageReference Include="KerbalSpaceProgram2.GameLibs" Version="0.1.3" PrivateAssets="all"/>
12+
<PackageReference Include="SpaceWarp" Version="1.4.0" />
13+
<PackageReference Include="KerbalSpaceProgram2.GameLibs" Version="0.1.4" PrivateAssets="all" />
1414
</ItemGroup>
1515
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
1616
<Exec Command="echo Killing task KSP2_x64.exe&#xD;&#xA;taskkill /f /fi &quot;pid gt 0&quot; /im KSP2_x64.exe&#xD;&#xA;&#xD;&#xA;echo Copying output .dll&#xD;&#xA;xcopy /y &quot;$(TargetDir)$(ProjectName).dll&quot; &quot;$(KSP2DIR)\BepInEx\plugins\micro_engineer\&quot;&#xD;&#xA;&#xD;&#xA;echo Copying output .pdb&#xD;&#xA;xcopy /y &quot;$(TargetDir)$(ProjectName).pdb&quot; &quot;$(KSP2DIR)\BepInEx\plugins\micro_engineer\&quot;&#xD;&#xA;&#xD;&#xA;echo Starting KSP2_x64.exe&#xD;&#xA;powershell &quot;start-process &quot;&quot;$(KSP2DIR)\KSP2_x64.exe&quot;&quot;&quot;" />

MicroEngineerProject/MicroEngineer/Entries/ManeuverEntries.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public TimeToNode()
133133
public override void RefreshData()
134134
{
135135
List<ManeuverNodeData> nodes = Utility.ActiveVessel?.SimulationObject?.FindComponent<ManeuverPlanComponent>()?.GetNodes();
136-
EntryValue = nodes?.ElementAtOrDefault(base.SelectedNodeIndex)?.Time - GameManager.Instance.Game.UniverseModel.UniversalTime;
136+
EntryValue = nodes?.ElementAtOrDefault(base.SelectedNodeIndex)?.Time - Utility.UniversalTime;
137137
}
138138
}
139139

MicroEngineerProject/MicroEngineer/Entries/OrbitalEntries.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ public SoiTransition()
490490
{
491491
Name = "SOI trans.";
492492
Description = "Shows the amount of time it will take to transition to another Sphere Of Influence.";
493+
EntryType = EntryType.Time;
493494
Category = MicroEntryCategory.Orbital;
494495
IsDefault = false;
495496
BaseUnit = "s";
@@ -498,7 +499,7 @@ public SoiTransition()
498499

499500
public override void RefreshData()
500501
{
501-
EntryValue = Utility.ActiveVessel.Orbit.UniversalTimeAtSoiEncounter - GameManager.Instance.Game.UniverseModel.UniversalTime;
502+
EntryValue = Utility.ActiveVessel.Orbit.UniversalTimeAtSoiEncounter - Utility.UniversalTime;
502503
}
503504
}
504505
}

MicroEngineerProject/MicroEngineer/MicroEngineerMod.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace MicroMod
1111
{
12-
[BepInPlugin("com.micrologist.microengineer", "MicroEngineer", "1.3.0")]
12+
[BepInPlugin("com.micrologist.microengineer", "MicroEngineer", "1.3.1")]
1313
[BepInDependency(SpaceWarpPlugin.ModGuid, SpaceWarpPlugin.ModVer)]
1414
public class MicroEngineerMod : BaseSpaceWarpPlugin
1515
{

MicroEngineerProject/MicroEngineer/Utilities/Utility.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static class Utility
2323
public static GameStateConfiguration GameState;
2424
public static MessageCenter MessageCenter;
2525
public static VesselDeltaVComponent VesselDeltaVComponentOAB;
26-
public static double UniversalTime => GameManager.Instance.Game.UniverseModel.UniversalTime;
26+
public static double UniversalTime => GameManager.Instance.Game.UniverseModel.UniverseTime;
2727

2828
/// <summary>
2929
/// Refreshes the ActiveVessel and CurrentManeuver

Staging/BepInEx/plugins/micro_engineer/swinfo.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Micro Engineer",
66
"description": "Get in-flight and VAB information about your current vessel",
77
"source": "https://github.com/Micrologist/MicroEngineer",
8-
"version": "1.3.0",
8+
"version": "1.3.1",
99
"version_check": "https://raw.githubusercontent.com/Micrologist/MicroEngineer/main/Staging/BepInEx/plugins/micro_engineer/swinfo.json",
1010
"dependencies": [
1111
{
@@ -24,7 +24,7 @@
2424
}
2525
],
2626
"ksp2_version": {
27-
"min": "0.1.0",
27+
"min": "0.1.4",
2828
"max": "*"
2929
}
3030
}

0 commit comments

Comments
 (0)