Skip to content

Commit

Permalink
fix: avoid duplicating nearby configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
zepfred authored and triceo committed Jul 31, 2024
1 parent 4f6b099 commit d01cd42
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,17 @@ The selector configuration (%s) already includes the Nearby Selection setting, m
Remove the Nearby setting from the selector configuration or remove the top-level nearbyDistanceMeterClass."""
.formatted(nearbySelectorConfig, configPolicy.getNearbyDistanceMeterClass()));
}
// We delay the autoconfiguration to the deepest UnionMoveSelectorConfig node in the tree
// to avoid duplicating configuration
// when there are nested unionMoveSelector configurations
if (selectorConfig instanceof UnionMoveSelectorConfig) {
continue;
}
// Add a new configuration with Nearby Selection enabled
moveSelectorConfigList
.add(nearbySelectorConfig.enableNearbySelection(configPolicy.getNearbyDistanceMeterClass(),
configPolicy.getRandom()));

}
}
}
Expand Down

0 comments on commit d01cd42

Please sign in to comment.