Added NotNearPosition Paramater Logic
authorRedacted <redacted@no-reply.carvel.li>
Tue, 11 Mar 2025 00:48:54 +0000 (00:48 +0000)
committerRedacted <redacted@no-reply.carvel.li>
Tue, 11 Mar 2025 00:48:54 +0000 (00:48 +0000)
Questionable/Controller/Steps/Shared/SkipCondition.cs

index 68c2e4d..1674792 100644 (file)
@@ -389,6 +389,17 @@ internal static class SkipCondition
                 }
             }
 
+            if (skipConditions.NotNearPosition is { } notNearPosition &&
+                clientState.TerritoryType == notNearPosition.TerritoryId)
+            {
+                if (notNearPosition.MaximumDistance <=
+                    Vector3.Distance(notNearPosition.Position, clientState.LocalPlayer!.Position))
+                {
+                    logger.LogInformation("Skipping step, as we're not near the position");
+                    return true;
+                }
+            }
+
             return false;
         }