- # Bail if we're too close to an existing light
- if self._lights.nearest(pos, max_distance=25):
- return
- # Also check turnips
- if check_turnips(self._space, pos, max_distance=25):
+ # Bail if we're too close to an existing light, obstacle or turnip
+ if check_space_for_light(self._space, pos, max_distance=25):