Skip to content

Commit

Permalink
Showing 5 changed files with 11 additions and 11 deletions.
Binary file modified GameData/RP-0/Plugins/RP0.dll
Binary file not shown.
Binary file modified GameData/RP-0/Plugins/RP0KCTBinder.dll
Binary file not shown.
5 changes: 1 addition & 4 deletions Source/KCTBinderModule.cs
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ public class KCTBinderModule : ScenarioModule

protected void Update()
{
if (HighLogic.CurrentGame == null || !FlightGlobals.ready)
if (HighLogic.CurrentGame == null || KerbalConstructionTime.KerbalConstructionTime.instance == null)
return;

if (skipOne)
@@ -37,9 +37,6 @@ protected void Update()
return;
}

if (KerbalConstructionTime.KerbalConstructionTime.instance == null)
return;

if (MaintenanceHandler.Instance == null)
return;

2 changes: 1 addition & 1 deletion Source/LoadingScreenChanger.cs
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ protected void Update()
}
}
int tC = textures.Count;
float screenTime = Mathf.Round(180f / (float)tC);
float screenTime = Mathf.Round(240f / (float)tC);
System.Random random = new System.Random();
if (tC > 0)
{
15 changes: 9 additions & 6 deletions Source/Maintenance/MaintenanceHandler.cs
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ public class MaintenanceHandler : ScenarioModule

[KSPField(isPersistant = true)]
public double nextUpdate = -1d;

[KSPField(isPersistant = true)]
public double lastUpdate = 0d;

@@ -69,9 +70,9 @@ public override void OnAwake()

public void Update()
{
if (HighLogic.CurrentGame == null || !FlightGlobals.ready)
if (HighLogic.CurrentGame == null)
return;

if (skipOne)
{
skipOne = false;
@@ -83,12 +84,13 @@ public void Update()
skipTwo = false;
return;
}

if (skipThree)
{
skipThree = false;
return;
}

if (facilityLevels.Count == 0)
{
foreach (Upgradeables.UpgradeableFacility facility in GameObject.FindObjectsOfType<Upgradeables.UpgradeableFacility>())
@@ -107,7 +109,7 @@ public void Update()
else
return;
}

Upgradeables.UpgradeableFacility.UpgradeLevel[] levels;
double facilityUpkeep = 0d;

@@ -178,15 +180,16 @@ public void Update()
if (TimeWarp.CurrentRate <= 100f)
{
wasWarpingHigh = false;

if (HighLogic.LoadedScene == GameScenes.SPACECENTER)
{
PopupDialog.SpawnPopupDialog(new Vector2(0.5f, 0.5f),
new Vector2(0.5f, 0.5f),
"Maintenance",
"We are paying the following maintenance costs per day/year:\nFacilities: "
+ facilityUpkeep.ToString("N0") + "/" + (facilityUpkeep * 365d).ToString("N0")
+ "\nIntegration / Pad Support Teams: " + (kctBPUpkeep).ToString("N0") + "/" + (kctBPUpkeep*365d).ToString("N0")
+ "\nResarch Teams:" + (kctRDUpkeep).ToString("N0") + "/" + (kctRDUpkeep* 365d).ToString("N0")
+ "\nIntegration / Pad Support Teams: " + (kctBPUpkeep).ToString("N0") + "/" + (kctBPUpkeep*365d).ToString("N0") + " - BP/s " + kctBuildRate.ToString("N3")
+ "\nResarch Teams:" + (kctRDUpkeep).ToString("N0") + "/" + (kctRDUpkeep* 365d).ToString("N0") + " - R/s " + kctResearcRate.ToString()
+ "\nAstronauts:" + (nautUpkeep).ToString("N0") + "/" + (nautUpkeep* 365d).ToString("N0"),
"OK",
true,

0 comments on commit 93d15ef

Please sign in to comment.