Start work on crafting/combinations

This commit is contained in:
2021-12-02 00:50:29 +00:00
parent ce06845278
commit 85ededc158
28 changed files with 189 additions and 112 deletions
+7 -1
View File
@@ -6,6 +6,7 @@ import Dodge.Data
import Dodge.WinScale
import Dodge.Base
import Dodge.Base.Window
import Dodge.Combine.Combinations
import Dodge.Inventory
import Dodge.Render.Connectors
import Dodge.Render.List
@@ -42,7 +43,9 @@ subInventoryDisplay cfig w = case _inventoryMode w of
, cursorsZ cfig cursPos it
, displayMidList cfig (ammoTweakStrings it) "TWEAK"
]
CombineInventory -> invHead cfig "COMBINE"
CombineInventory ->
displayMidList cfig (combineListStrings w) "COMBINE"
-- invHead cfig "COMBINE"
InspectInventory -> invHead cfig "INSPECT"
where
itCol = fromMaybe (greyN 0.5) . (^? _Just . itInvColor)
@@ -61,6 +64,9 @@ cursorsZ cfig ipos it = case it ^? _Just . itTweaks . tweakSel of
hw = halfWidth cfig
sp = V2 (125 - hw) ( hh - (20 * fromIntegral ipos + 17.5))
combineListStrings :: World -> [String]
combineListStrings = map (show . snd) . combineList . fmap _itCombineType . yourInv
ammoTweakStrings :: Maybe Item -> [String]
ammoTweakStrings it = case it ^? _Just . itTweaks . tweakParams of
Just l -> map tweakString $ IM.elems l