Cleanup
This commit is contained in:
@@ -1,18 +1,16 @@
|
||||
module Dodge.AssignHotkey (assignHotkey) where
|
||||
|
||||
import Dodge.Data.Equipment.Misc
|
||||
import Control.Lens
|
||||
import Data.Maybe
|
||||
import Dodge.Data.Equipment.Misc
|
||||
import Dodge.Data.World
|
||||
import NewInt
|
||||
|
||||
-- it is not obvious to me whether hotkeys should belong to LWorld, CWorld or
|
||||
-- World
|
||||
assignHotkey :: NewInt ItmInt -> Hotkey -> LWorld -> LWorld
|
||||
assignHotkey i hk lw = lw
|
||||
assignHotkey i hk lw =
|
||||
lw
|
||||
& handleoldposition
|
||||
& hotkeys . at hk ?~ i
|
||||
-- & imHotkeys . unNIntMap . at itid ?~ hk
|
||||
& imHotkeys . at i ?~ hk
|
||||
where
|
||||
handleoldposition = fromMaybe id $ do
|
||||
|
||||
Reference in New Issue
Block a user