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

Added minimap file #272

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open

Added minimap file #272

wants to merge 8 commits into from

Conversation

manantt
Copy link

@manantt manantt commented May 5, 2019

No description provided.

sc2/minimap.py Outdated
return map_data

@property_cache_forever
def heighmap(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: heightmap

sc2/minimap.py Outdated
def add_minerals(self, map_data):
for mineral in self.game.state.resources:
mine_pos = mineral.position
cv2.circle(map_data, (int(mine_pos[0]*self.map_scale), int(mine_pos[1]*self.map_scale)), int(mineral.radius*self.map_scale), (255, 255, 86), -1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minerals are 1.5*0.5 rectangles

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can I know orientation?

sc2/minimap.py Outdated
return map_data

def add_minerals(self, map_data):
for mineral in self.game.state.resources:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use mineral_field, because resources also contains the geysers

sc2/minimap.py Outdated
map_data,
(
int((unit.position[0] - unit.radius / 2) * self.map_scale),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you dont need to devide the radius by 2

sc2/minimap.py Outdated
# cv2.circle(map_data, (int(unit.position[0]*self.map_scale), int(unit.position[1]*self.map_scale)), int(unit.radius*self.map_scale), (0, 250, 250), -1)

for unit in self.game.known_enemy_units:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isnt this a duplicate of add_enemies?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is

sc2/minimap.py Outdated
-1,
)
if self.show_ramps:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything in here are just map tiles, no real objects, so they should be squares not circles

sc2/minimap.py Outdated
show_allies=True,
show_enemies=True
):
self.game = game
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add all colors to init to be able to change them easier and add a comment what color it is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants