Refactor world events

This commit is contained in:
2022-07-22 14:30:53 +01:00
parent 7fdb70dd1c
commit 43e7d20b21
14 changed files with 95 additions and 40 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ module Dodge.Event.Keyboard
, handleTextInput
, guardDisconnectedID
) where
import Dodge.WorldPos
import Dodge.Button.Event
import Dodge.Terminal
import Dodge.InputFocus
@@ -134,7 +135,7 @@ spaceAction w = case _hudElement $ _hud w of
DisplayInventory DisplayTerminal {} -> w & hud . hudElement .~ DisplayInventory NoSubInventory
_ -> w & hud . hudElement .~ DisplayInventory NoSubInventory
where
theLoc = fst (_seenLocations w IM.! _selLocation w) w
theLoc = doWorldPos (fst (_seenLocations w IM.! _selLocation w)) w
-- updateTopCloseObject i w' = w' & closeObjects %~ ( Right (_buttons w' IM.! i) : ) . tail
pauseGame :: World -> World