Allow creation of items via typed command
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
module Dodge.Inventory.Add where
|
||||
import Dodge.Data
|
||||
import Dodge.Inventory.CheckSlots
|
||||
import Dodge.FloorItem
|
||||
import Dodge.Combine.Module
|
||||
import Dodge.Base.You
|
||||
|
||||
import Data.Maybe
|
||||
import Control.Lens
|
||||
@@ -42,3 +45,6 @@ tryPutItemInInv cid flit w = case maybeInvSlot of
|
||||
-- updateItLocation invid w' = case _itID it of
|
||||
-- Nothing -> w'
|
||||
-- Just j -> w' & itemPositions . ix j .~ InInv cid invid
|
||||
createPutItem :: Item -> World -> World
|
||||
createPutItem it w = uncurry (putItemInInvID (_yourID w))
|
||||
$ copyItemToFloorID (_crPos $ you w) (applyModules it) w
|
||||
|
||||
Reference in New Issue
Block a user