Permalink
Browse files

merge the V and R commands

  • Loading branch information...
1 parent cf184ec commit bd7a4986d75087403e3ea4fe730b3ceb3caffc5c @Mikolaj Mikolaj committed Mar 30, 2011
Showing with 7 additions and 9 deletions.
  1. +3 −5 src/State.hs
  2. +4 −4 src/Turn.hs
View
8 src/State.hs
@@ -78,12 +78,10 @@ updateDungeon :: (Dungeon -> Dungeon) -> State -> State
updateDungeon f s = s {sdungeon = f (sdungeon s)}
toggleVision :: State -> State
-toggleVision s = s { ssensory = case ssensory s of Vision 1 -> Implicit
+toggleVision s = s { ssensory = case ssensory s of Vision 1 -> Smell
Vision n -> Vision (n-1)
- _ -> Vision 3 }
-
-toggleSmell :: State -> State
-toggleSmell s = s { ssensory = if ssensory s == Smell then Implicit else Smell }
+ Smell -> Implicit
+ Implicit -> Vision 3 }
toggleOmniscient :: State -> State
toggleOmniscient s = s { sdisplay = if sdisplay s == Omniscient
View
8 src/Turn.hs
@@ -245,7 +245,7 @@ stdKeybindings = Keybindings
(K.Char '*', monsterCommand),
(K.Char '/', floorCommand),
- (K.Char ':', floorCommand), -- synonym for backward compat.
+ (K.Char ':', floorCommand), -- synonym for backward compat.
(K.Tab , heroCommand),
-- items
@@ -256,6 +256,7 @@ stdKeybindings = Keybindings
(K.Char 'q', quaffCommand),
(K.Char 'r', readCommand),
(K.Char 't', throwCommand),
+ (K.Char 'v', throwCommand), -- synonym for Angband comapt.
(K.Char 'a', aimCommand),
-- wait
@@ -267,14 +268,13 @@ stdKeybindings = Keybindings
(K.Char 'Q', quitCommand),
-- debug modes
- (K.Char 'V', Undescribed $ modify toggleVision >> withPerception playerCommand),
- (K.Char 'R', Undescribed $ modify toggleSmell >> playerCommand),
+ (K.Char 'R', Undescribed $ modify toggleVision >> withPerception playerCommand),
(K.Char 'O', Undescribed $ modify toggleOmniscient >> playerCommand),
(K.Char 'T', Undescribed $ modify toggleTerrain >> playerCommand),
(K.Char 'I', Undescribed $ gets (lmeta . slevel) >>= abortWith),
-- information for the player
- (K.Char 'v', Undescribed $ abortWith version),
+ (K.Char 'V', Undescribed $ abortWith version),
(K.Char 'M', historyCommand),
(K.Char 'D', dumpCommand),
(K.Char '?', helpCommand),

0 comments on commit bd7a498

Please sign in to comment.