This commit is contained in:
2022-05-21 21:53:49 +01:00
parent e9cc7e64c9
commit f555a4bf05
12 changed files with 32 additions and 31 deletions
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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)
+2 -4
View File
@@ -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]