projects
/
naja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Slightly better required keys displaying (now required keys are always shown).
[naja.git]
/
naja
/
widgets
/
tile.py
diff --git
a/naja/widgets/tile.py
b/naja/widgets/tile.py
index 9e8fe8508056dae9bc61a4e93ccd547c772514d9..b8985551318b5a369a90e166a33a04afaee6b517 100644
(file)
--- a/
naja/widgets/tile.py
+++ b/
naja/widgets/tile.py
@@
-94,10
+94,12
@@
class TileWidget(Widget):
self.surface.blit(img, (TILE_SIZE[0] - 20, 0))
def _prepare_lock(self, action, y_offset):
self.surface.blit(img, (TILE_SIZE[0] - 20, 0))
def _prepare_lock(self, action, y_offset):
- if action.required_bits not in BIT_MAP:
+ required_keys = action.required_bits & frozenset([
+ BITS.RED, BITS.GREEN, BITS.BLUE])
+ if required_keys not in BIT_MAP:
return 4
return 4
- img_name = BIT_MAP[
action.required_bit
s]
+ img_name = BIT_MAP[
required_key
s]
if self.board_pos != self.state.player.position:
x_offset = 0
if self.board_pos != self.state.player.position:
x_offset = 0