Skip to content

Commit

Permalink
Fixed nullref when going into options while creating a new game
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxgurugamer committed Aug 31, 2020
1 parent 2f4ed38 commit 4d946f8
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 4 deletions.
Binary file modified .vs/slnx.sqlite
Binary file not shown.
4 changes: 4 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
Changelog

0.5.1.3
Fixed nullref when going into options while creating a new game

0.5.1.2
Added optional (default is to use) interface with KCT to adjust the research times based on what's been allocated in KCT
Formula used is: 0.1*(X+1)*LN(1+1/(0.1*(X+1)))

0.5.1.1
Fixed name of radial tanks to show what it holds
Expand Down
2 changes: 1 addition & 1 deletion GameData/LTech/LTech.version
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"MAJOR": 0,
"MINOR": 5,
"PATCH": 1,
"BUILD": 2
"BUILD": 3
},
"KSP_VERSION": {
"MAJOR": 1,
Expand Down
Binary file modified GameData/LTech/Plugins/LtScience.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion LTech.version
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"MAJOR": 0,
"MINOR": 5,
"PATCH": 1,
"BUILD": 2
"BUILD": 3
},
"KSP_VERSION": {
"MAJOR": 1,
Expand Down
2 changes: 1 addition & 1 deletion LtScience/AssemblyVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@

using System.Reflection;

[assembly: AssemblyVersion("0.5.1.2")]
[assembly: AssemblyVersion("0.5.1.3")]
4 changes: 3 additions & 1 deletion LtScience/Utilities/StockSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace LtScience.Utilities
// HighLogic.CurrentGame.Parameters.CustomParams<LTech>().useAltSkin
public class LTech_1 : GameParameters.CustomParameterNode
{
internal static LTech_1 fetch = null;
public override string Title { get { return ""; } }
public override GameParameters.GameMode GameMode { get { return GameParameters.GameMode.ANY; } }
public override string Section { get { return "L-Tech"; } }
Expand All @@ -35,6 +36,7 @@ public override bool Enabled(MemberInfo member, GameParameters parameters)
}
public override bool Interactible(MemberInfo member, GameParameters parameters)
{
fetch = this;
return true;
}
public override IList ValidValues(MemberInfo member) { return null; }
Expand Down Expand Up @@ -76,7 +78,7 @@ public override bool Interactible(MemberInfo member, GameParameters parameters)
{
if (member.Name == "useKCTResearch" || member.Name == "useKCTDevelopment" || member.Name == "CostAdj")
{
return HighLogic.CurrentGame.Parameters.CustomParams<LTech_1>().useEfficiencyMultiplier;
return LTech_1.fetch.useEfficiencyMultiplier;
}

return true;
Expand Down

0 comments on commit 4d946f8

Please sign in to comment.