Allow for equipment items to set a minimum view distance
This commit is contained in:
@@ -73,8 +73,8 @@ toggleEquipmentAt rbops invid cr w = case rbops ^? opAllocateEquipment of
|
||||
crpoint = creatures . ix (_crID cr)
|
||||
itmat i = _crInv cr IM.! i
|
||||
itm = itmat (_crInvSel cr)
|
||||
onequip itm' = (_eqOnEquip . _itUse) itm' itm'
|
||||
onremove itm' = (_eqOnRemove . _itUse) itm' itm'
|
||||
onequip itm' = (_eqOnEquip . _eqEq . _itUse) itm' itm'
|
||||
onremove itm' = (_eqOnRemove . _eqEq . _itUse) itm' itm'
|
||||
|
||||
useLeftItem :: Int -> World -> World
|
||||
useLeftItem cid w
|
||||
@@ -88,7 +88,7 @@ useLeftItem cid w
|
||||
where
|
||||
cr = _creatures w IM.! cid
|
||||
itmShouldBeUsed = isJust (cr ^? crInv . ix (_crInvSel cr) . itUse . cUse)
|
||||
|| ( isJust (cr ^? crInv . ix (_crInvSel cr) . itUse . eqUse)
|
||||
|| ( isJust (cr ^? crInv . ix (_crInvSel cr) . itUse . eqEq . eqUse)
|
||||
&& _crLeftInvSel cr /= Just (_crInvSel cr)
|
||||
)
|
||||
-- TODO determine itmShouldBeUsed with reference to config options
|
||||
|
||||
Reference in New Issue
Block a user