let's make space_for_point a little bit more forgiving
This commit is contained in:
parent
14c4311f8f
commit
87c0a2f757
1 changed files with 1 additions and 1 deletions
|
@ -354,7 +354,7 @@ class Router:
|
|||
return self.spaces[space]
|
||||
spaces = (self.spaces[space] for space in level.spaces if space not in excluded_spaces)
|
||||
spaces = ((space, space.geometry.distance(point)) for space in spaces)
|
||||
spaces = tuple((space, distance) for space, distance in spaces if distance < 0.5)
|
||||
spaces = tuple((space, distance) for space, distance in spaces if distance < 20)
|
||||
if not spaces:
|
||||
return None
|
||||
return min(spaces, key=operator.itemgetter(1))[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue