Detect when Shift is pressed and don't return a WaitAction when Shift+. is pressed

This commit is contained in:
Eryn Wells 2023-02-12 14:29:45 -08:00
parent 253db06683
commit a709f3fba5

View file

@ -64,6 +64,8 @@ class MainGameEventHandler(EventHandler):
hero = self.engine.hero hero = self.engine.hero
is_shift_pressed = bool(event.mod & tcod.event.Modifier.SHIFT)
sym = event.sym sym = event.sym
match sym: match sym:
case tcod.event.KeySym.b: case tcod.event.KeySym.b:
@ -87,7 +89,8 @@ class MainGameEventHandler(EventHandler):
case tcod.event.KeySym.SPACE: case tcod.event.KeySym.SPACE:
action = RegenerateRoomsAction(hero) action = RegenerateRoomsAction(hero)
case tcod.event.KeySym.PERIOD: case tcod.event.KeySym.PERIOD:
action = WaitAction(hero) if not is_shift_pressed:
action = WaitAction(hero)
return action return action