import pygame.locals as pgl
from naja.constants import BOARD_SIZE, TILE_SIZE, KEYS, ACT, FPS
-from naja.events import finish_event
+from naja.events import InvalidateTheWorld, finish_event
from naja.sound import sound
from naja.widgets.base import Widget
tile.animation = 0
def handle_event(self, ev):
+ if InvalidateTheWorld.matches(ev):
+ self.flash_light.reset()
if self.state.gameboard.player_mode == ACT:
return super(BoardWidget, self).handle_event(ev)
if ev.type == pgl.KEYDOWN:
INFO_SIZE, ACT, KEYS, EXAMINE, PALETTE,
ACTION_TEXT_OFFSET, INFO_LEFT_PADDING,
INFO_RIGHT_PADDING, BIT_SIZE, BITS)
-from naja.events import finish_event
+from naja.events import InvalidateTheWorld, finish_event
from naja.resources import resources
from naja.resources.mutators import EIGHT_BIT, blender
from naja.sound import sound
self.set_position(player.position)
def handle_event(self, ev):
+ if InvalidateTheWorld.matches(ev):
+ self.flash_light.reset()
if self.state.gameboard.player_mode == EXAMINE:
return super(InfoAreaWidget, self).handle_event(ev)
if ev.type == pgl.KEYDOWN: