Skip to content

Commit

Permalink
Update GUI_Editor.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Clayell authored Feb 6, 2025
1 parent 0a7d57a commit b3dc827
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Source/RP0/UI/KCT/GUI_Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,23 @@ private static void RenderEditMode()
double fullVesselBP = SpaceCenterManagement.Instance.EditorVessel.buildPoints;
double bpLeaderEffect = SpaceCenterManagement.Instance.EditorVessel.LeaderEffect;
double effic = editedVessel.LC.Efficiency;
double usedShipsCost = 0d;
foreach (VesselProject v in SpaceCenterManagement.Instance.MergedVessels)
{
usedShipsCost += v.effectiveCost;
}
double costDifference = editedVessel.effectiveCost - usedShipsCost;
KCTUtilities.GetShipEditProgress(editedVessel, out double newProgressBP, out double originalCompletionPercent, out double newCompletionPercent);
GUILayout.Label($"Original: {Math.Max(0, originalCompletionPercent):P2}");
GUILayout.Label($"Edited: {newCompletionPercent:P2}");
if (costDifference >= 0)
{
GUILayout.Label($"Cost Increase: +{costDifference:F0}");
}
else
{
GUILayout.Label($"Cost Decrease: -{costDifference:F0}");
}

double rateWithCurEngis = KCTUtilities.GetBuildRate(editedVessel.LC, SpaceCenterManagement.Instance.EditorVessel.mass, SpaceCenterManagement.Instance.EditorVessel.buildPoints, SpaceCenterManagement.Instance.EditorVessel.humanRated, 0)
* effic * editedVessel.LC.StrategyRateMultiplier;
Expand Down

0 comments on commit b3dc827

Please sign in to comment.