Skip to content

Commit

Permalink
Integrate with RP-1 config validation
Browse files Browse the repository at this point in the history
  • Loading branch information
siimav committed Jul 26, 2024
1 parent 94f890b commit 5ccabc8
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Source/ProceduralFairings/FairingSide.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,30 @@ private void OffsetHinge(UnityEngine.MeshFilter mf)
mh.localPosition = hingeOffset;
}
}

/// <summary>
/// Called from RP-1
/// </summary>
/// <param name="validationError"></param>
/// <param name="canBeResolved"></param>
/// <param name="costToResolve"></param>
/// <param name="techToResolve"></param>
/// <returns></returns>
public virtual bool Validate(out string validationError, out bool canBeResolved, out float costToResolve, out string techToResolve)
{
validationError = null;
canBeResolved = false;
costToResolve = 0;
techToResolve = null;

if (density + 0.0001 < minDensity)
{
validationError = $"density needs to be {minDensity:0.###} or higher";
return false;
}

return true;
}
}

internal class ColliderPool
Expand Down

0 comments on commit 5ccabc8

Please sign in to comment.