Allow creation of items via typed command

This commit is contained in:
2022-06-19 11:04:16 +01:00
parent 075d4b1164
commit 6cc29813d8
7 changed files with 61 additions and 39 deletions
+7 -4
View File
@@ -18,7 +18,8 @@ import Dodge.Combine
import Dodge.Event.Keyboard
--import Dodge.Event.Menu
import Dodge.Base
import Dodge.Combine.Module
--import Dodge.Item
--import Dodge.Combine.Module
import Dodge.Data
--import Dodge.Base.Window
import Dodge.PreloadData
@@ -28,7 +29,7 @@ import Dodge.Inventory.Add
import Dodge.SoundLogic
--import Geometry
--import Preload.Update
import Dodge.FloorItem
--import Dodge.FloorItem
import qualified IntMapHelp as IM
import ListHelp
@@ -109,12 +110,14 @@ doCombine :: Int -> World -> World
doCombine i w = case combineItemListYou w !? i of
Nothing -> w
Just (is,it) -> enterCombineInv
. uncurry (putItemInInvID yid)
. copyItemToFloorID (_crPos $ you w) (applyModules it)
. createPutItem it
-- . uncurry (putItemInInvID yid)
-- . copyItemToFloorID (_crPos $ you w) (applyModules it)
$ foldr (rmInvItem yid) w (sort is)
where
yid = _yourID w
handleMouseWheelEvent :: MouseWheelEventData -> Universe -> Maybe Universe
handleMouseWheelEvent mwev w = case _menuLayers w of
[] -> case mouseWheelEventPos mwev of