Refactor, try to limit dependencies
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
module Dodge.Inventory.Lock where
|
||||
import Dodge.Data
|
||||
|
||||
import Control.Lens
|
||||
import Dodge.Data.World
|
||||
|
||||
lockInv :: Int -> World -> World
|
||||
lockInv cid = cWorld . creatures . ix cid . crInvLock %~ (|| True)
|
||||
lockInv cid = cWorld . creatures . ix cid . crInvLock ||~ True
|
||||
|
||||
unlockInv :: Int -> World -> World
|
||||
unlockInv cid = cWorld . creatures . ix cid . crInvLock %~ (&& False)
|
||||
unlockInv cid = cWorld . creatures . ix cid . crInvLock &&~ False
|
||||
|
||||
Reference in New Issue
Block a user