Skip to content

Commit d2ee287

Browse files
Merge pull request #118 from post-kerbin-mining-corporation/dev
Release 0.7.3
2 parents 3501309 + 1606867 commit d2ee287

7 files changed

Lines changed: 20 additions & 11 deletions

File tree

0 Bytes
Binary file not shown.

GameData/SystemHeat/Versioning/SystemHeat.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{
77
"MAJOR":0,
88
"MINOR":7,
9-
"PATCH":2,
9+
"PATCH":3,
1010
"BUILD":0
1111
},
1212
"KSP_VERSION":

SystemHeat/SystemHeat/Modules/ModuleSystemHeatFissionReactor.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ public void DoCatchup()
517517
if (elapsedTime > 0d)
518518
{
519519
Utils.Log($"[SystemHeatFissionReactor] Catching up {elapsedTime} s of time on load", LogType.Modules);
520-
float fuelThrottle = CurrentReactorThrottle / 100f;
520+
double fuelThrottle = CurrentReactorThrottle / 100f;
521521

522522
foreach (ResourceRatio ratio in inputs)
523523
{
@@ -818,7 +818,7 @@ private void HandleResourceActivities(float timeStep)
818818

819819
fuelCheckPassed = true;
820820
burnRate = 0d;
821-
float fuelThrottle = CurrentReactorThrottle / 100f;
821+
double fuelThrottle = CurrentReactorThrottle / 100f;
822822

823823
// Check for full-ness
824824
foreach (ResourceRatio ratio in outputs)
@@ -834,7 +834,7 @@ private void HandleResourceActivities(float timeStep)
834834
// Check for fuel and consume
835835
foreach (ResourceRatio ratio in inputs)
836836
{
837-
double amt = this.part.RequestResource(ratio.ResourceName, fuelThrottle * ratio.Ratio * timeStep, ratio.FlowMode);
837+
double amt = this.part.RequestResource(ratio.ResourceName, fuelThrottle * ratio.Ratio * (double)timeStep, ratio.FlowMode);
838838

839839
if (MinimumThrottle > 0)
840840
{
@@ -858,7 +858,10 @@ private void HandleResourceActivities(float timeStep)
858858
}
859859
}
860860
if (ratio.ResourceName == FuelName)
861+
{
861862
burnRate = fuelThrottle * ratio.Ratio;
863+
Debug.Log($"Fuels: {fuelThrottle:E5}, {ratio.Ratio:E5}, {burnRate:E5}");
864+
}
862865
}
863866
// If fuel consumed, add waste
864867
if (fuelCheckPassed)
@@ -981,7 +984,7 @@ public void DoReactorRepair()
981984
// Finds time remaining at specified fuel burn rates
982985
public string FindTimeRemaining(double amount, double rate)
983986
{
984-
if (rate < 0.0000001)
987+
if (rate < 1E-15)
985988
{
986989
return Localizer.Format("#LOC_SystemHeat_ModuleSystemHeatFissionReactor_Field_FuelStatus_VeryLong");
987990
}

SystemHeat/SystemHeat/Modules/ModuleSystemHeatRadiator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public override void FixedUpdate()
208208

209209
if (HighLogic.LoadedSceneIsEditor)
210210
{
211-
if (base.IsCooling || base._depRad.deployState == ModuleDeployablePart.DeployState.EXTENDED)
211+
if (base.IsCooling || ((base._depRad != null) && (base._depRad.deployState == ModuleDeployablePart.DeployState.EXTENDED)))
212212
{
213213
radiativeFlux = -temperatureCurve.Evaluate(heatModule.LoopTemperature);
214214
convectiveFlux = 0f;

SystemHeat/SystemHeat/UI/ToolbarUI/ToolbarSituation.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ public void Initialize(Transform root)
7373
if (HighLogic.LoadedSceneIsEditor)
7474
{
7575
currentBody = FlightGlobals.GetHomeBody();
76-
bodyDopdown.AddOptions(FlightGlobals.Bodies.Select(x => x.name).ToList());
76+
bodyDopdown.AddOptions(FlightGlobals.Bodies.Select(x => x.bodyDisplayName.LocalizeRemoveGender()).ToList());
7777
for (int i = 0; i < bodyDopdown.options.Count; i++)
7878
{
79-
if (bodyDopdown.options[i].text == currentBody.name)
79+
if (bodyDopdown.options[i].text == currentBody.bodyDisplayName.LocalizeRemoveGender())
8080
bodyDopdown.SetValueWithoutNotify(i);
8181
}
8282

@@ -189,7 +189,7 @@ public void OnBodyDropdownChange()
189189
Utils.Log($"[ToolbarPanel]: Selected body {bodyDopdown.options[bodyDopdown.value].text}", LogType.UI);
190190
foreach (CelestialBody body in FlightGlobals.Bodies)
191191
{
192-
if (body.name == bodyDopdown.options[bodyDopdown.value].text)
192+
if (body.bodyDisplayName.LocalizeRemoveGender() == bodyDopdown.options[bodyDopdown.value].text)
193193
{
194194
currentBody = body;
195195
SetBody(currentBody);

changelog.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
v0.7.1
1+
v0.7.3
2+
------
3+
- Fixed an issue where static radiators would create exceptions in the editor
4+
- Allowed lower resource flow rates for fission reactors to work correctly and show in the UI
5+
- Situation checklist dropdown in the Toolbar UI now uses BodyDisplayName instead of internal name
6+
7+
v0.7.2
28
------
39
- Fixed the coolant tank being renamed for no particular reason (ghosts??)
410

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
================
2-
SystemHeat 0.7.2
2+
SystemHeat 0.7.3
33
================
44

55
A mod for Kerbal Space Program, intended to provide a better experience for heat management, particularly geared towards resource extraction, high energy engines, and nuclear reactors.

0 commit comments

Comments
 (0)