Skip to content

Commit 0aa6465

Browse files
committed
re-added relevant part of comment that explains why this bit is needed.
1 parent 92d8413 commit 0aa6465

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/kOS/Module/kOSProcessor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ public ModifierChangeWhen GetModuleCostChangeWhen()
270270
private void UpdateCostAndMass()
271271
{
272272
// Clamp this to prevent negative cost and mass.
273+
// (Can happen when people edit part.cfg data or
274+
// use ModuleManager.)
273275
float spaceDelta = Mathf.Max(diskSpace - baseDiskSpace, 0.0f);
274276
additionalCost = (float)System.Math.Round(spaceDelta * diskSpaceCostFactor, 0);
275277
AdditionalMass = spaceDelta * diskSpaceMassFactor;

0 commit comments

Comments
 (0)