Cleanup
This commit is contained in:
@@ -61,7 +61,7 @@ armourChaseCrit = chaseCrit
|
||||
]
|
||||
, _crMvType = defaultChaseMvType {_mvTurnRad = f}
|
||||
}
|
||||
& crEquipment . at OnChest .~ Just 0
|
||||
& crInvEquipped . at 0 .~ Just OnChest
|
||||
& crEquipment . at OnChest ?~ 0
|
||||
& crInvEquipped . at 0 ?~ OnChest
|
||||
where
|
||||
f _ = 0.05
|
||||
|
||||
@@ -48,8 +48,8 @@ toggleEquipmentAt invid itm cr = case cr ^? crInvEquipped . ix invid of
|
||||
|
||||
equipUsingSite :: Int -> Item -> Creature -> Creature
|
||||
equipUsingSite invid itm cr = cr
|
||||
& crInvEquipped . at invid .~ Just epos
|
||||
& crEquipment . at epos .~ Just invid
|
||||
& crInvEquipped . at invid ?~ epos
|
||||
& crEquipment . at epos ?~ invid
|
||||
& removeOtherEquipment
|
||||
where
|
||||
epos = eqSiteToPos cr (_eqSite $ _itUse itm)
|
||||
|
||||
@@ -261,11 +261,9 @@ light4 = light . light . light . light
|
||||
|
||||
drawEquipment :: Creature -> SPic
|
||||
{-# INLINE drawEquipment #-}
|
||||
drawEquipment cr = mconcat $ map f $ IM.toList (_crInv cr)
|
||||
drawEquipment cr = foldMap f (_crInv cr)
|
||||
where
|
||||
f (i,it) = case it ^? itEquipPict of
|
||||
Just g -> g cr i
|
||||
_ -> emptyBlank
|
||||
f itm = _itEquipPict itm cr itm
|
||||
|
||||
circLine :: Float -> Picture
|
||||
circLine x = line [V2 0 0,V2 x 0]
|
||||
|
||||
Reference in New Issue
Block a user