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: 7eca3893270b
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e94c40a74255
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Apr 7, 2018

  1. Copy the full SHA
    b8f4f14 View commit details
  2. Merge pull request #1794 from eggrobin/1.4.2

    Compile against 1.4.2, deprecate 1.2.2.
    pleroy authored Apr 7, 2018
    Copy the full SHA
    e94c40a View commit details
Showing with 27 additions and 18 deletions.
  1. +1 −1 ksp_plugin_adapter/compatibility_extensions.cs
  2. +16 −7 ksp_plugin_adapter/ksp_plugin_adapter.cs
  3. +10 −10 ksp_plugin_adapter/ksp_plugin_adapter.csproj
2 changes: 1 addition & 1 deletion ksp_plugin_adapter/compatibility_extensions.cs
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ namespace ksp_plugin_adapter {

internal static class CompatibilityExtensions {
public static string NameWithArticle(this CelestialBody body) {
#if KSP_VERSION_1_3_1 || KSP_VERSION_1_4_1
#if KSP_VERSION_1_3_1 || KSP_VERSION_1_4_2
// We are not writing string templates for this mod, sorry.
return body.displayName.StartsWith("The ") ? "the " + body.name : body.name;
#elif KSP_VERSION_1_2_2
23 changes: 16 additions & 7 deletions ksp_plugin_adapter/ksp_plugin_adapter.cs
Original file line number Diff line number Diff line change
@@ -248,11 +248,11 @@ private KSP.UI.Screens.SpaceTracking space_tracking {
Versioning.version_minor != 3 ||
Versioning.Revision != 1) {
string expected_version = "1.3.1";
#elif KSP_VERSION_1_4_1
if (Versioning.version_major != 1 ||
Versioning.version_minor != 4 ||
Versioning.Revision != 1) {
string expected_version = "1.4.1";
#elif KSP_VERSION_1_4_2
if (!(Versioning.version_major == 1 &&
Versioning.version_minor == 4 &&
(Versioning.Revision == 1 || Versioning.Revision == 2))) {
string expected_version = "1.4.2 and 1.4.1";
#endif
Log.Fatal("Unexpected KSP version " + Versioning.version_major + "." +
Versioning.version_minor + "." + Versioning.Revision +
@@ -496,7 +496,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_4_1
#if KSP_VERSION_1_4_2
bool success = UnityEngine.ImageConversion.LoadImage(
texture2d, File.ReadAllBytes(full_path));
#elif KSP_VERSION_1_2_2 || KSP_VERSION_1_3_1
@@ -660,7 +660,7 @@ private void OnGUI() {
PopupDialog.SpawnPopupDialog(
anchorMin : default(UnityEngine.Vector2),
anchorMax : default(UnityEngine.Vector2),
#if KSP_VERSION_1_3_1 || KSP_VERSION_1_4_1
#if KSP_VERSION_1_3_1 || KSP_VERSION_1_4_2
dialogName : "Principia error",
#endif
title : "Principia",
@@ -2049,11 +2049,20 @@ private void DrawMainWindow(int window_id) {
UnityEngine.GUILayout.TextArea(text : "Plugin is not started");
}
if (DateTimeOffset.Now > next_release_date_) {
#if KSP_VERSION_1_2_2
UnityEngine.GUILayout.TextArea(
"Announcement: the new moon of lunation number " +
next_release_lunation_number_ +
" has come; please update KSP to version 1.3.1 and download the " +
"latest Principia release, " + next_release_name_ + ". Note that " +
"RealismOverhaul and RealSolarSystem now support KSP 1.3.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_ + ".");
#endif
}
String version;
String unused_build_date;
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_4_1</DefineConstants>
<DefineConstants>TRACE;DEBUG;KSP_VERSION_1_4_2</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_4_1</DefineConstants>
<DefineConstants>TRACE;KSP_VERSION_1_4_2</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DebugSymbols>true</DebugSymbols>
@@ -57,36 +57,36 @@
</PropertyGroup>
<ItemGroup Condition="'$(Configuration)' == 'Release' Or '$(Configuration)' == 'Debug'">
<Reference Include="Assembly-CSharp">
<HintPath>..\..\KSP Assemblies\1.4.1\Assembly-CSharp.dll</HintPath>
<HintPath>..\..\KSP Assemblies\1.4.2\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="UnityEngine">
<HintPath>..\..\KSP Assemblies\1.4.1\UnityEngine.dll</HintPath>
<HintPath>..\..\KSP Assemblies\1.4.2\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule" Condition="'$(OS)' == 'Unix'">
<HintPath>..\..\KSP Assemblies\1.4.1\UnityEngine.CoreModule.dll</HintPath>
<HintPath>..\..\KSP Assemblies\1.4.2\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.ImageConversionModule" Condition="'$(OS)' == 'Unix'">
<HintPath>..\..\KSP Assemblies\1.4.1\UnityEngine.ImageConversionModule.dll</HintPath>
<HintPath>..\..\KSP Assemblies\1.4.2\UnityEngine.ImageConversionModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.IMGUIModule" Condition="'$(OS)' == 'Unix'">
<HintPath>..\..\KSP Assemblies\1.4.1\UnityEngine.IMGUIModule.dll</HintPath>
<HintPath>..\..\KSP Assemblies\1.4.2\UnityEngine.IMGUIModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.PhysicsModule" Condition="'$(OS)' == 'Unix'">
<HintPath>..\..\KSP Assemblies\1.4.1\UnityEngine.PhysicsModule.dll</HintPath>
<HintPath>..\..\KSP Assemblies\1.4.2\UnityEngine.PhysicsModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule" Condition="'$(OS)' == 'Unix'">
<HintPath>..\..\KSP Assemblies\1.4.1\UnityEngine.TextRenderingModule.dll</HintPath>
<HintPath>..\..\KSP Assemblies\1.4.2\UnityEngine.TextRenderingModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>..\..\KSP Assemblies\1.4.1\UnityEngine.UI.dll</HintPath>
<HintPath>..\..\KSP Assemblies\1.4.2\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>