Skip to content

Commit

Permalink
Fix SCOnConnect fix
Browse files Browse the repository at this point in the history
Wasn't checking flags, so incorrect behavior.

This is what happens when you force me to preempt too early.
  • Loading branch information
Fayti1703 committed Apr 15, 2020
1 parent 83ad1db commit a07f725
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Pathfinder/PathfinderHooks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,14 @@ public static bool onSCOnConnectCheck(SCOnConnect self, out bool retVal, ref Com
{
var os = (OS) objOS;

Console.WriteLine(computer);
if (!string.IsNullOrWhiteSpace(self.requiredFlags))
{
if (self.requiredFlags.Split(Utils.commaDelim, StringSplitOptions.RemoveEmptyEntries).Any(flag => !os.Flags.HasFlag(flag)))
{
retVal = false;
return true;
}
}

if (self.needsMissionComplete)
{
Expand Down

0 comments on commit a07f725

Please sign in to comment.