Skip to content

Commit

Permalink
Use stock method for determining if part is a decoupler
Browse files Browse the repository at this point in the history
  • Loading branch information
siimav committed Mar 18, 2024
1 parent a3f1beb commit e6f490b
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ private void RunVesselJointUpdateFunction(Vessel v)
}
}

if (KJRJointUtils.settings.reinforceDecouplersFurther && IsValidDecoupler(p))
if (KJRJointUtils.settings.reinforceDecouplersFurther && p.isDecoupler(out _))
{
MultiJointReinforceDecoupler(p);
continue;
Expand Down Expand Up @@ -324,11 +324,6 @@ private void RunVesselJointUpdateFunction(Vessel v)
if (KJRJointUtils.settings.debug) Debug.Log($"[KJR] RunVesselJointUpdateFunction finished in {sw.Elapsed.TotalMilliseconds}ms");
}

private bool IsValidDecoupler(Part p)
{
return p.Modules.Contains<ModuleDecouple>() || p.Modules.Contains<ModuleAnchoredDecoupler>();
}

public void FixedUpdate()
{
if (FlightGlobals.ready && FlightGlobals.Vessels != null)
Expand Down

0 comments on commit e6f490b

Please sign in to comment.