-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from post-kerbin-mining-corporation/dev
Release 2.3.3
- Loading branch information
Showing
10 changed files
with
87 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+0 Bytes
(100%)
GameData/DynamicBatteryStorage/Plugins/DynamicBatteryStorage.dll
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
{ | ||
"MAJOR":2, | ||
"MINOR":3, | ||
"PATCH":2, | ||
"PATCH":3, | ||
"BUILD":0 | ||
}, | ||
"KSP_VERSION": | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
Source/DynamicBatteryStorage/Handlers/Power/WDSPPowerHandlers.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using System; | ||
|
||
namespace DynamicBatteryStorage | ||
{ | ||
|
||
/// <summary> | ||
/// Handler for Weather Driven Solar Panel | ||
/// </summary> | ||
public class WDSPPowerHandlers : ModuleDataHandler | ||
{ | ||
public WDSPPowerHandlers(HandlerModuleData moduleData) : base(moduleData) | ||
{ } | ||
|
||
public override bool Initialize(PartModule pm) | ||
{ | ||
base.Initialize(pm); | ||
/// If kopernicus is using the multistar settings, we need to only show this thing in flight as the new handler wipes the data in editor | ||
/// We need to rely on the | ||
if (Settings.KopernicusMultiStar) | ||
{ | ||
return HighLogic.LoadedSceneIsFlight; | ||
} | ||
return true; | ||
} | ||
|
||
protected override double GetValueEditor() | ||
{ | ||
/// Invalid in editor | ||
return 0f; | ||
} | ||
protected override double GetValueFlight() | ||
{ | ||
double results = 0d; | ||
if (double.TryParse(pm.Fields.GetValue("currentOutput").ToString(), out results)) | ||
{ | ||
return results; | ||
} | ||
return results; | ||
|
||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters