Remove ComposedItem, to be replaced with PartiallyComposedItem
This commit is contained in:
@@ -27,17 +27,19 @@ useRootItem crid w = (worldEventFlags . at InventoryChange ?~ ()) . fromMaybe w
|
||||
cr <- w ^? cWorld . lWorld . creatures . ix crid
|
||||
itRef <- cr ^? crManipulation . manObject . imRootSelectedItem
|
||||
itmtree <- invRootTrees (_crInv cr) ^? ix itRef
|
||||
let itm = itmtree ^. ldtValue . cItem
|
||||
case itmtree ^. ldtValue . cItemFunction of
|
||||
let itm = itmtree ^. ldtValue . _1
|
||||
case itmtree ^. ldtValue . _2 of
|
||||
WeaponPlatformSF ->
|
||||
return $
|
||||
heldEffect (bimap _iatType _cItem itmtree) cr w
|
||||
heldEffect (bimap _iatType fst3 itmtree) cr w
|
||||
& pointerToItem itm . itUse . heldHammer .~ HammerDown
|
||||
EquipmentPlatformSF -> do
|
||||
guard (_crHammerPosition cr == HammerUp)
|
||||
invid <- itm ^? itLocation . ilInvID
|
||||
return $ toggleEquipmentAt invid cr w
|
||||
_ -> Nothing
|
||||
where
|
||||
fst3 (x,_,_) = x
|
||||
|
||||
-- where
|
||||
-- UseHotkey{} -> doequipmentchange
|
||||
|
||||
Reference in New Issue
Block a user