Remove invTrees function

This commit is contained in:
2024-11-29 20:47:16 +00:00
parent de4a955206
commit 59c65b059a
3 changed files with 5 additions and 33 deletions
+1 -12
View File
@@ -40,16 +40,6 @@ useRootItem crid w = (worldEventFlags . at InventoryChange ?~ ()) . fromMaybe w
where
fst3 (x,_,_) = x
-- where
-- UseHotkey{} -> doequipmentchange
-- UseEquip{} -> doequipmentchange
-- (UseConsume eff) -> useC eff (_ldtValue itmtree) cr w
-- UseCraft{} -> w
-- UseAttach{} -> selectUse itmtree cr w
-- UseAmmoMag{} -> w
-- UseScope{} -> w
-- UseBulletMod{} -> w
toggleEquipmentAt :: Int -> Creature -> World -> World
toggleEquipmentAt invid cr w = case getEquipmentAllocation w of
DoNotMoveEquipment -> w
@@ -108,8 +98,7 @@ useItemLeftClick cr w = fromMaybe w $ do
UseHotkey{} -> return $ doequipmentchange invid
UseAmmoMag{} -> return w
UseAttach{} -> do
itmtree <- invTrees (_crInv cr) ^? ix invid
return $ selectUse itmtree cr w
return $ selectUse itm cr w
_ -> Nothing
where
doequipmentchange invid = fromMaybe w $ do