Remove invTrees function
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user