Unify inventory sections further (slow?)

This commit is contained in:
2023-02-11 13:10:10 +00:00
parent 286c84e50d
commit 24825728f5
7 changed files with 58 additions and 174 deletions
+1 -2
View File
@@ -123,7 +123,7 @@ useLeftItem cid w = fromMaybe w $ do
cr ^? crInv . ix itRef . itUse . cUse
itmIsEquipable = isJust $ do
itRef <- mitRef
guard . not $ cr ^. crLeftInvSel . lisMPos /= Just itRef
guard $ cr ^. crLeftInvSel . lisMPos == Just itRef
cr ^? crInv . ix itRef . itUse . equipEffect . eeUse
if itmIsConsumable || itmIsEquipable
then return $ useItem cr w -- I believe this ONLY sets equipment options
@@ -136,6 +136,5 @@ useLeftItem cid w = fromMaybe w $ do
. useL f itm cr
$ w
where
-- TODO determine itmShouldBeUsed with reference to config options