Cleanup
This commit is contained in:
@@ -54,30 +54,11 @@ useItemLoc cr loc pt w
|
||||
, Just invid' <- itm ^? itLocation . ilInvID =
|
||||
return $ toggleEquipmentAt invid' cr w
|
||||
| otherwise = (\loc' -> useItemLoc cr loc' pt w) =<< locUp' loc
|
||||
-- ie try location above
|
||||
where
|
||||
sf = loc ^. locDT . dtValue . _2
|
||||
ldt = loc ^. locDT
|
||||
itm = ldt ^. dtValue . _1
|
||||
|
||||
--chooseUseLocation :: LocationLDT ItemLink OItem -> LocationLDT ItemLink OItem
|
||||
--chooseUseLocation loc
|
||||
-- | isJust $ loc ^? locLDT . ldtValue . _1 . itType . ibtEquip = loc
|
||||
-- | isJust $ loc ^? locLDT . ldtValue . _1 . itUse . uaParams . apProjectiles . ix 0 =
|
||||
-- loc
|
||||
-- | sf <- loc ^. locLDT . ldtValue . _2
|
||||
-- , structureUseAtLoc sf =
|
||||
-- loc
|
||||
-- | otherwise = maybe loc chooseUseLocation $ locUp loc
|
||||
--
|
||||
--structureUseAtLoc :: ItemStructuralFunction -> Bool
|
||||
--structureUseAtLoc = \case
|
||||
-- HeldPlatformSF -> True
|
||||
-- UnderBarrelPlatformSF -> True
|
||||
-- GadgetPlatformSF -> True
|
||||
-- MapperSF -> True
|
||||
-- _ -> False
|
||||
|
||||
activateDetonator :: DTree OItem -> World -> World
|
||||
activateDetonator det = fromMaybe id $ do
|
||||
pjid <- det ^? dtValue . _1 . itUse . uaParams . apProjectiles . ix 0
|
||||
@@ -118,9 +99,7 @@ toggleEquipmentAt invid cr w = case getEquipmentAllocation invid w of
|
||||
crpoint = cWorld . lWorld . creatures . ix (_crID cr)
|
||||
itmat i = _crInv cr IM.! i
|
||||
itm = itmat invid
|
||||
--onequip itm' = doItmCrWdWd ((_eeOnEquip . _uequipEffect . _itUse) itm') itm'
|
||||
onequip itm' = effectOnEquip itm'
|
||||
--onremove itm' = doItmCrWdWd ((_eeOnRemove . _uequipEffect . _itUse) itm') itm'
|
||||
onremove itm' = effectOnRemove itm'
|
||||
|
||||
toggleExamineInv :: World -> World
|
||||
|
||||
Reference in New Issue
Block a user