Skip to content

Commit

Permalink
Changed fix to properly add a default key in the ProfileManager
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxgurugamer committed Jun 26, 2021
1 parent d3c99d3 commit 76f934f
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 6 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
ChangeLog

1.9.9.2
Changed fix to properly add a default key in the ProfileManager

1.9.9.1
Thanks to github user @kfsone for pointing out this error:
added missing ! in ScienceAlertProfileManager.cs to void a null ref exception
Expand Down
Binary file added GameData/ScienceAlert/Plugins/ScienceAlert.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion GameData/ScienceAlert/ScienceAlert.version
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"MAJOR": 1,
"MINOR": 9,
"PATCH": 9,
"BUILD": 1
"BUILD": 2
},
"KSP_VERSION_MIN": {
"MAJOR": 1,
Expand Down
2 changes: 1 addition & 1 deletion ScienceAlert.version
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"MAJOR": 1,
"MINOR": 9,
"PATCH": 9,
"BUILD": 1
"BUILD": 2
},
"KSP_VERSION_MIN": {
"MAJOR": 1,
Expand Down
2 changes: 1 addition & 1 deletion Source/AssemblyVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@

using System.Reflection;

[assembly: AssemblyVersion("1.9.9.1")]
[assembly: AssemblyVersion("1.9.9.2")]
26 changes: 26 additions & 0 deletions Source/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Source/Properties/Settings.settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
</SettingsFile>
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,11 @@ public static Profile DefaultProfile
get
{
var key = Instance.storedProfiles.Keys.SingleOrDefault(k => k.ToLower().Equals("default"));
if (!string.IsNullOrEmpty(key))
if (string.IsNullOrEmpty(key))
{
key = "default";
Instance.storedProfiles.Add(key, Profile.MakeDefault());
}
return Instance.storedProfiles[key];
}
}
Expand Down
3 changes: 2 additions & 1 deletion Source/ScienceAlert.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<DebugType>portable</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<DebugType>portable</DebugType>
Expand Down Expand Up @@ -135,4 +136,4 @@ if $(ConfigurationName) == Release (
<PropertyGroup>
<PreBuildEvent>"$(DevEnvDir)\texttransform.exe" "$(ProjectDir)AssemblyVersion.tt"</PreBuildEvent>
</PropertyGroup>
</Project>
</Project>
8 changes: 7 additions & 1 deletion deploy.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@ rem VERSIONFILE is the name of the version file, usually the same as GAMEDATA,
rem but not always

set H=%KSPDIR%
rem set H=R:\KSP_1.12.0

set GAMEDIR=ScienceAlert
set GAMEDATA="GameData"
set VERSIONFILE=%GAMEDIR%.version

set DP0=r:\dp0\kspdev

copy /Y "%1%2" "%GAMEDATA%\%GAMEDIR%\Plugins"
copy /Y "%1%3".pdb "%GAMEDATA%\%GAMEDIR%\Plugins"

copy /Y %VERSIONFILE% %GAMEDATA%\%GAMEDIR%

xcopy /y /s /I %GAMEDATA%\%GAMEDIR% "%H%\GameData\%GAMEDIR%"
xcopy /y /s /I %GAMEDATA%\%GAMEDIR% "%DP0%\GameData\%GAMEDIR%"

rem pause
rem pause

0 comments on commit 76f934f

Please sign in to comment.