Return to project, unsure about changes

This commit is contained in:
2024-05-25 13:10:50 +01:00
parent 08716e8ade
commit c862c862df
63 changed files with 1137641 additions and 52 deletions
+9 -2
View File
@@ -4,8 +4,10 @@ import TreeHelp
import Dodge.Data.World
import Dodge.HeldScroll
import qualified IntMapHelp as IM
import qualified Data.Map.Strict as M
import Control.Lens
import Control.Monad
import Data.Maybe
you :: World -> Creature
you w = w ^?! cWorld . lWorld . creatures . ix 0
@@ -35,8 +37,13 @@ yourScopeInvID w = do
yourInv :: World -> IM.IntMap Item
yourInv = _crInv . you
attachmentTree :: Creature -> [Tree Int]
attachmentTree cr = []
attachmentTree :: Creature -> M.Map AttachType Int
attachmentTree cr = fromMaybe mempty $ do
i <- cr ^? crManipulation . manObject . inInventory . ispItem
return $ upDownAttachments cr i i mempty
upDownAttachments :: Creature -> Int -> Int -> M.Map AttachType Int -> M.Map AttachType Int
upDownAttachments cr i j s = s
--yourInvSel :: World -> Int
--yourInvSel = crSel . you