Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0033bebb5f46
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bec06003de40
Choose a head ref
  • 4 commits
  • 3 files changed
  • 1 contributor

Commits on May 26, 2019

  1. deprecate 1.3.1

    eggrobin committed May 26, 2019
    Copy the full SHA
    334c4c1 View commit details
  2. deprecate 1.4.x as well

    eggrobin committed May 26, 2019
    Copy the full SHA
    d235db5 View commit details
  3. 1.7.0 support

    eggrobin committed May 26, 2019
    Copy the full SHA
    9235264 View commit details
  4. Merge pull request #2180 from eggrobin/1.7.0

    1.7.0
    eggrobin authored May 26, 2019
    Copy the full SHA
    bec0600 View commit details
Showing with 30 additions and 19 deletions.
  1. +5 −4 ksp_plugin_adapter/ksp_plugin_adapter.cs
  2. +10 −10 ksp_plugin_adapter/ksp_plugin_adapter.csproj
  3. +15 −5 ksp_plugin_adapter/main_window.cs
9 changes: 5 additions & 4 deletions ksp_plugin_adapter/ksp_plugin_adapter.cs
Original file line number Diff line number Diff line change
@@ -198,14 +198,15 @@ private KSP.UI.Screens.SpaceTracking space_tracking {
Versioning.version_minor != 3 ||
Versioning.Revision != 1) {
string expected_version = "1.3.1";
#elif KSP_VERSION_1_6_1
#elif KSP_VERSION_1_7_0
if (!(Versioning.version_major == 1 &&
(Versioning.version_minor == 4 &&
(Versioning.Revision >= 1 && Versioning.Revision <= 5)) ||
(Versioning.version_minor == 5 && Versioning.Revision == 1) ||
(Versioning.version_minor == 6 && Versioning.Revision == 1))) {
(Versioning.version_minor == 6 && Versioning.Revision == 1) ||
(Versioning.version_minor == 7 && Versioning.Revision == 0))) {
string expected_version =
"1.6.1, 1.5.1, 1.4.5, 1.4.4, 1.4.3, 1.4.2, and 1.4.1";
"1.7.0, 1.6.1, 1.5.1, 1.4.5, 1.4.4, 1.4.3, 1.4.2, and 1.4.1";
#endif
Log.Fatal("Unexpected KSP version " + Versioning.version_major + "." +
Versioning.version_minor + "." + Versioning.Revision +
@@ -455,7 +456,7 @@ private bool LoadTextureIfExists(out UnityEngine.Texture texture,
path;
if (File.Exists(full_path)) {
var texture2d = new UnityEngine.Texture2D(2, 2);
#if KSP_VERSION_1_6_1
#if KSP_VERSION_1_7_0
bool success = UnityEngine.ImageConversion.LoadImage(
texture2d, File.ReadAllBytes(full_path));
#elif KSP_VERSION_1_3_1
20 changes: 10 additions & 10 deletions ksp_plugin_adapter/ksp_plugin_adapter.csproj
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Debug\GameData\Principia\</OutputPath>
<DefineConstants>TRACE;DEBUG;KSP_VERSION_1_6_1</DefineConstants>
<DefineConstants>TRACE;DEBUG;KSP_VERSION_1_7_0</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
@@ -27,7 +27,7 @@
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Release\GameData\Principia\</OutputPath>
<DefineConstants>TRACE;KSP_VERSION_1_6_1</DefineConstants>
<DefineConstants>TRACE;KSP_VERSION_1_7_0</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DebugSymbols>true</DebugSymbols>
@@ -46,36 +46,36 @@
</PropertyGroup>
<ItemGroup Condition="'$(Configuration)' == 'Release' Or '$(Configuration)' == 'Debug'">
<Reference Include="Assembly-CSharp">
<HintPath>..\..\KSP Assemblies\1.6.1\Assembly-CSharp.dll</HintPath>
<HintPath>..\..\KSP Assemblies\1.7.0\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="UnityEngine">
<HintPath>..\..\KSP Assemblies\1.6.1\UnityEngine.dll</HintPath>
<HintPath>..\..\KSP Assemblies\1.7.0\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule" Condition="'$(OS)' == 'Unix'">
<HintPath>..\..\KSP Assemblies\1.6.1\UnityEngine.CoreModule.dll</HintPath>
<HintPath>..\..\KSP Assemblies\1.7.0\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.ImageConversionModule" Condition="'$(OS)' == 'Unix'">
<HintPath>..\..\KSP Assemblies\1.6.1\UnityEngine.ImageConversionModule.dll</HintPath>
<HintPath>..\..\KSP Assemblies\1.7.0\UnityEngine.ImageConversionModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.IMGUIModule" Condition="'$(OS)' == 'Unix'">
<HintPath>..\..\KSP Assemblies\1.6.1\UnityEngine.IMGUIModule.dll</HintPath>
<HintPath>..\..\KSP Assemblies\1.7.0\UnityEngine.IMGUIModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.PhysicsModule" Condition="'$(OS)' == 'Unix'">
<HintPath>..\..\KSP Assemblies\1.6.1\UnityEngine.PhysicsModule.dll</HintPath>
<HintPath>..\..\KSP Assemblies\1.7.0\UnityEngine.PhysicsModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule" Condition="'$(OS)' == 'Unix'">
<HintPath>..\..\KSP Assemblies\1.6.1\UnityEngine.TextRenderingModule.dll</HintPath>
<HintPath>..\..\KSP Assemblies\1.7.0\UnityEngine.TextRenderingModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>..\..\KSP Assemblies\1.6.1\UnityEngine.UI.dll</HintPath>
<HintPath>..\..\KSP Assemblies\1.7.0\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
20 changes: 15 additions & 5 deletions ksp_plugin_adapter/main_window.cs
Original file line number Diff line number Diff line change
@@ -170,11 +170,21 @@ protected override void RenderWindow(int window_id) {
style : Style.Warning(UnityEngine.GUI.skin.label));
}
if (DateTimeOffset.Now > next_release_date_) {
UnityEngine.GUILayout.TextArea(
"Announcement: the new moon of lunation number " +
next_release_lunation_number_ +
" has come; please download the latest Principia release, " +
next_release_name_ + ".");
if (Versioning.Revision <= 4) {
UnityEngine.GUILayout.TextArea(
"Announcement: the new moon of lunation number " +
next_release_lunation_number_ +
" has come; please update KSP to version 1.6.1 and download " +
"the latest Principia release, " + next_release_name_ + ". " +
"Note that RealismOverhaul and RealSolarSystem now support " +
"KSP 1.6.1.");
} else {
UnityEngine.GUILayout.TextArea(
"Announcement: the new moon of lunation number " +
next_release_lunation_number_ +
" has come; please download the latest Principia release, " +
next_release_name_ + ".");
}
}
Interface.GetVersion(build_date : out string unused_build_date,
version : out string version);