Cleanup
This commit is contained in:
@@ -21,7 +21,6 @@ import Dodge.Data.Combine
|
||||
import Dodge.Data.Universe
|
||||
import Dodge.DisplayInventory
|
||||
import Dodge.Event.Test
|
||||
import Dodge.InputFocus
|
||||
import Dodge.Inventory
|
||||
import Dodge.Inventory.Add
|
||||
import Dodge.ListDisplayParams
|
||||
@@ -39,22 +38,19 @@ import SDL
|
||||
updateUseInputInGame :: Universe -> Universe
|
||||
updateUseInputInGame u = updateFunctionKeys $ case u ^. uvWorld . hud . hudElement of
|
||||
DisplayCarte -> over uvWorld updatePressedButtonsCarte u
|
||||
DisplayInventory{_subInventory = si} -> case si of
|
||||
DisplayInventory{_subInventory = si, _diSelection = disel} -> case si of
|
||||
DisplayTerminal tmid -> updateKeysInTerminal tmid u
|
||||
CombineInventory{_ciSections = sss, _ciSelection = msel}
|
||||
| inSubInvRegex (u ^. uvWorld) ->
|
||||
CombineInventory{_ciSections = sss, _ciSelection = msel@(Just ((-1),_,_))} ->
|
||||
u
|
||||
& uvWorld . hud . hudElement . subInventory
|
||||
%~ docombineregexinput sss msel
|
||||
& uvWorld . worldEventFlags . at CombineInventoryChange ?~ ()
|
||||
_
|
||||
| inInvRegex (u ^. uvWorld) ->
|
||||
_ | disel ^? _Just . _1 == Just (-1) ->
|
||||
u & uvWorld . hud . hudElement
|
||||
%~ dodisplayregexinput diInvFilter diInvFilter (-1)
|
||||
& uvWorld . worldEventFlags . at InventoryChange ?~ ()
|
||||
& uvWorld %~ setInvPosFromSS
|
||||
_
|
||||
| inCloseRegex (u ^. uvWorld) ->
|
||||
_ | disel ^? _Just . _1 == Just 2 ->
|
||||
u & uvWorld . hud . hudElement
|
||||
%~ dodisplayregexinput diCloseFilter diCloseFilter 2
|
||||
& uvWorld . worldEventFlags . at InventoryChange ?~ ()
|
||||
|
||||
Reference in New Issue
Block a user