Skip to content

Commit

Permalink
Showing 3 changed files with 5 additions and 4 deletions.
Binary file modified GameData/RP-0/Plugins/RP0.dll
Binary file not shown.
Binary file modified GameData/RP-0/Plugins/RP0KCTBinder.dll
Binary file not shown.
9 changes: 5 additions & 4 deletions Source/Crew/ActiveCourse.cs
Original file line number Diff line number Diff line change
@@ -73,8 +73,9 @@ public void FromConfigNode(ConfigNode node)

public bool MeetsStudentReqs(ProtoCrewMember student)
{
if (!((student.type == (ProtoCrewMember.KerbalType.Crew) && (seatMax <= 0 || Students.Count < seatMax) && !student.inactive && student.rosterStatus == ProtoCrewMember.RosterStatus.Available && student.experienceLevel >= minLevel &&
student.experienceLevel <= maxLevel && (classes.Length == 0 || classes.Contains(student.trait)) && !Students.Contains(student))))
if (!((student.type == (ProtoCrewMember.KerbalType.Crew) && (seatMax <= 0 || Students.Count < seatMax) && !student.inactive
&& student.rosterStatus == ProtoCrewMember.RosterStatus.Available && student.experienceLevel >= minLevel && student.experienceLevel <= maxLevel
&& (classes.Length == 0 || classes.Contains(student.trait)) && !Students.Contains(student))))
return false;

int pCount = preReqs.GetLength(0);
@@ -86,11 +87,11 @@ public bool MeetsStudentReqs(ProtoCrewMember student)

int needCount = pCount;

for (int entryIdx = student.flightLog.Count; entryIdx-- > 0 && needCount > 0;)
for (int entryIdx = student.flightLog.Count; entryIdx-- > 0 && (needCount > 0 || cCount > 0);)
{
FlightLog.Entry e = student.flightLog.Entries[entryIdx];

for (int preIdx = pCount; preIdx-- > 0;)
for (int preIdx = pCount; preIdx-- > 0 && needCount > 0;)
{
if (pChecker[preIdx] && (e.type == preReqs[preIdx, 0] && (string.IsNullOrEmpty(preReqs[preIdx, 1]) || e.target == preReqs[preIdx, 1])))
{

0 comments on commit 4848786

Please sign in to comment.