Skip to content

Commit

Permalink
Validate avionics utilization on vessel getting queued
Browse files Browse the repository at this point in the history
  • Loading branch information
siimav committed Dec 16, 2023
1 parent 93739dc commit 269a87e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/RP0/Avionics/ModuleProceduralAvionics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,12 @@ public virtual bool Validate(out string validationError, out bool canBeResolved,
if (CurrentProceduralAvionicsConfig == null && !string.IsNullOrEmpty(avionicsConfigName))
CurrentProceduralAvionicsConfig = ProceduralAvionicsTechManager.GetProceduralAvionicsConfig(avionicsConfigName);

if (Utilization > 1.001)
{
validationError = $"increase part size until avionics utilization is 100% or less";
return false;
}

techToResolve = CurrentProceduralAvionicsTechNode.TechNodeName;

if (!CurrentProceduralAvionicsTechNode.IsAvailable)
Expand Down

0 comments on commit 269a87e

Please sign in to comment.