Add files, move towards joining items in inventory

This commit is contained in:
2024-09-09 23:13:00 +01:00
parent db4a6a10de
commit 52d0008441
12 changed files with 230 additions and 270 deletions
+19 -79
View File
@@ -1,95 +1,35 @@
/home/justin/Haskell/loop/src/Dodge/Combine.hs:31:1-15: warning: [-Wunused-top-binds]
Defined but not used: invertInventory
|
31 | invertInventory =
| ^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Combine.hs:43:1-14: warning: [-Wunused-top-binds]
Defined but not used: splitItAmounts
|
43 | splitItAmounts = concatMap f
| ^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Combine.hs:53:1-18: warning: [-Wunused-top-binds]
Defined but not used: flatSplitItAmounts
|
53 | flatSplitItAmounts = concatMap f
| ^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Combine.hs:58:1-11: warning: [-Wunused-top-binds]
Defined but not used: lookupItems
|
58 | lookupItems = flip multiLookupTrieI combinationsTrie . sortOn fst . splitItAmounts . invertInventory
| ^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Combine/Combinations.hs:9:1-21: warning: [-Wunused-imports]
The import of Data.Bifunctor is redundant
|
9 | import Data.Bifunctor
| ^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Render/HUD.hs:237:15-18: warning: [-Wunused-matches]
Defined but not used: cfig
|
237 | combineCounts cfig w = foldMap f . group
| ^^^^
/home/justin/Haskell/loop/src/Dodge/Render/HUD.hs:237:20: warning: [-Wunused-matches]
Defined but not used: w
|
237 | combineCounts cfig w = foldMap f . group
| ^
/home/justin/Haskell/loop/src/Dodge/Item/Amount.hs:3:1-19: warning: [-Wunused-imports]
The import of Control.Lens is redundant
|
3 | import Control.Lens
| ^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Item/Amount.hs:4:1-17: warning: [-Wunused-imports]
The import of Data.Maybe is redundant
|
4 | import Data.Maybe
| ^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Item/Amount.hs:8:15-16: warning: [-Wunused-matches]
Defined but not used: it
|
8 | itStackAmount it = 1 -- fromMaybe 1 $ it ^? itUse . useAmount
| ^^
/home/justin/Haskell/loop/src/Dodge/Inventory/CheckSlots.hs:7:1-19: warning: [-Wunused-imports]
The import of Control.Lens is redundant
|
7 | import Control.Lens
| ^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Inventory/CheckSlots.hs:8:1-17: warning: [-Wunused-imports]
The import of Data.Maybe is redundant
|
8 | import Data.Maybe
| ^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Inventory/CheckSlots.hs:28:14-15: warning: [-Wunused-matches]
Defined but not used: it
|
28 | findItemSlot it inv = maybe 0 ((+ 1) . fst) $ IM.lookupMax inv
| ^^
/home/justin/Haskell/loop/src/Dodge/Item/SlotsTaken.hs:5:1-19: warning: [-Wunused-imports]
The import of Control.Lens is redundant
|
5 | import Control.Lens
| ^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Item/Grammar.hs:3:1-22: warning: [-Wunused-imports]
The import of Dodge.Data.Item is redundant
|
3 | import Dodge.Data.Item
| ^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:20:1-15: warning: [-Wunused-top-binds]
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:20:1: warning: [-Wunused-top-binds]
Defined but not used: itemHeldAmmoPic
|
20 | itemHeldAmmoPic itm amit = itemSPic itm <> addAmmoClip itm amit
| ^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:23:1-11: warning: [-Wunused-top-binds]
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:23:1: warning: [-Wunused-top-binds]
Defined but not used: addAmmoClip
|
23 | addAmmoClip itm amit = fromMaybe mempty $ do
| ^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:23:17-20: warning: [-Wunused-matches]
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:23:17: warning: [-Wunused-matches]
Defined but not used: amit
|
23 | addAmmoClip itm amit = fromMaybe mempty $ do
| ^^^^
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:24:5-7: warning: [-Wunused-matches]
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:24:5: warning: [-Wunused-matches]
Defined but not used: hit
|
24 | hit <- itm ^? itType . iyBase . ibtHeld
| ^^^
/home/justin/Haskell/loop/src/Dodge/Inventory/CheckSlots.hs:7:1: warning: [-Wunused-imports]
The import of Control.Lens is redundant
|
7 | import Control.Lens
| ^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Inventory/CheckSlots.hs:8:1: warning: [-Wunused-imports]
The import of Data.Maybe is redundant
|
8 | import Data.Maybe
| ^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Inventory/CheckSlots.hs:28:14: warning: [-Wunused-matches]
Defined but not used: it
|
28 | findItemSlot it inv = maybe 0 ((+ 1) . fst) $ IM.lookupMax inv
| ^^