diff --git a/sharpy/plans/acts/defensive_building.py b/sharpy/plans/acts/defensive_building.py index 36b4bf4c..453932c7 100644 --- a/sharpy/plans/acts/defensive_building.py +++ b/sharpy/plans/acts/defensive_building.py @@ -63,10 +63,8 @@ async def execute(self) -> bool: for y in range(-2, 2): pos = int_pos + Point2((x, y)) if ( - pos.x > 0 - and pos.x < self.ai.state.creep.width - and pos.y > 0 - and pos.y < self.ai.state.creep.height + 0 < pos.x < self.ai.state.creep.width + and 0 < pos.y < self.ai.state.creep.height and self.ai.state.creep.is_set(pos) ): can_build = True diff --git a/sharpy/plans/acts/position_building.py b/sharpy/plans/acts/position_building.py index d24df031..78c19f5e 100644 --- a/sharpy/plans/acts/position_building.py +++ b/sharpy/plans/acts/position_building.py @@ -48,10 +48,8 @@ async def actually_build(self, ai, count): for y in range(-2, 2): pos = int_pos + Point2((x, y)) if ( - pos.x > 0 - and pos.x < self.ai.state.creep.width - and pos.y > 0 - and pos.y < self.ai.state.creep.height + 0 < pos.x < self.ai.state.creep.width + and 0 < pos.y < self.ai.state.creep.height and self.ai.state.creep.is_set(pos) ): can_build = True