Add fast select buttons
Test / Run tests (push) Successful in 14s

This commit is contained in:
2026-08-11 00:26:27 +02:00
parent 3983393e10
commit f0accc8df8
5 changed files with 276 additions and 65 deletions
@@ -54,6 +54,14 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
return p;
}
public Path? GetFreePath(IEnumerable<INode> points, bool overrideStart = false) {
if (overrideStart) {
return GetPath(points, (n) => n is not ISink && (n is not Valve v || !v.LockedForPaths.Any(p => p.Start != points.First())));
} else {
return GetPath(points, (n) => n is not ISink && (n is not Valve v || !v.IsLocked));
}
}
public Path? GetPath(IEnumerable<INode> points, Func<INode, bool>? valid = null) {
if (points.Count() < 2) return null;
var start = points.First();