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 850a056 commit 0d70e4a
Show file tree
Hide file tree
Showing 2 changed files with 5 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 @@ -84,7 +84,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
4 changes: 3 additions & 1 deletion sc2/game_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ def __init__(self, response_observation):
# self.visibility[point]: 0=Hidden, 1=Fogged, 2=Visible
self.visibility: PixelMap = PixelMap(self.observation_raw.map_state.visibility, mirrored=True)
# self.creep[point]: 0=No creep, 1=creep
self.creep: PixelMap = PixelMap(self.observation_raw.map_state.creep, mirrored=True)
# 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, mirrored=True)

# Effects like ravager bile shot, lurker attack, everything in effect_id.py
self.effects: Set[EffectData] = {EffectData(effect) for effect in self.observation_raw.effects}
Expand Down

0 comments on commit 0d70e4a

Please sign in to comment.