Skip to content

Commit

Permalink
fix: applying fix from python-sc2/Dentosal#283
Browse files Browse the repository at this point in the history
  • Loading branch information
Hartorn committed Jun 19, 2019
1 parent dd8fcf6 commit edb79a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sc2/game_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def __init__(self, game_data, proto):
self._game_data = game_data
self._proto = proto

assert self.id != 0
# https://github.com/Dentosal/python-sc2/issues/283#issuecomment-495991889
# assert self.id != 0

def __repr__(self) -> str:
return f"AbilityData(name={self._proto.button_name})"
Expand Down
5 changes: 4 additions & 1 deletion sc2/game_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ def __init__(self, response_observation, game_data):

self.blips: Set[Blip] = {Blip(unit) for unit in hiddenUnits}
self.visibility: PixelMap = PixelMap(self.observation_raw.map_state.visibility)
self.creep: PixelMap = PixelMap(self.observation_raw.map_state.creep)

# See https://github.com/Dentosal/python-sc2/issues/283#issuecomment-495991889
self.creep: PixelMap = PixelMap(self.observation_raw.map_state.creep, in_bits=True, mirrored=True)
# self.creep: PixelMap = PixelMap(self.observation_raw.map_state.creep)

self.effects: Set[EffectData] = {
EffectData(effect) for effect in self.observation_raw.effects
Expand Down

0 comments on commit edb79a1

Please sign in to comment.