Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excluded lowered supply depots from non pathables #85

Merged
merged 1 commit into from
Sep 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions MapAnalyzer/Pather.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pyastar.astar_wrapper as pyastar
from numpy import ndarray
from sc2.position import Point2
from sc2.ids.unit_typeid import UnitTypeId as UnitID
from skimage import draw as skdraw

from MapAnalyzer.constants import NONPATHABLE_RADIUS_FACTOR, RESOURCE_BLOCKER_RADIUS_FACTOR, GEYSER_RADIUS_FACTOR
Expand Down Expand Up @@ -69,8 +70,8 @@ def _set_pathlib_map(self) -> None:
)

def _add_non_pathables_ground(self, grid: ndarray, include_destructables: bool = True) -> ndarray:
nonpathables = self.map_data.bot.structures
nonpathables.extend(self.map_data.bot.enemy_structures)
nonpathables = self.map_data.bot.structures.exclude_type({UnitID.SUPPLYDEPOTLOWERED})
nonpathables.extend(self.map_data.bot.enemy_structures.exclude_type({UnitID.SUPPLYDEPOTLOWERED}))
nonpathables.extend(self.map_data.mineral_fields)
nonpathables.extend(self.map_data.normal_geysers)
for obj in nonpathables:
Expand Down