Hlint pass

This commit is contained in:
2021-07-12 12:44:43 +02:00
parent 75254cd3e4
commit ac66b4b9d6
8 changed files with 85 additions and 96 deletions
+12 -9
View File
@@ -14,6 +14,7 @@ import Dodge.Creature.Test
--import Dodge.Creature.AlertLevel.Data
--import Dodge.Picture.Layer
import Dodge.Item.Data
import Dodge.Base.Window
import Picture
import Geometry
import Geometry.Vector3D
@@ -26,15 +27,17 @@ basicCrPict
-> Creature
-> World
-> Picture
basicCrPict col cr w = pictures $
targetingPic ++
[ tr . setDepth 0 $ color yellow $ circleSolid 10
, tr . piercingMod $ bluntScale $ naked col cr
, tr $ torso (light4 col) (0,-crad) (0,crad)
, trFeet $ feet cr
, tr $ arms col cr
, tr $ drawEquipment cr
]
basicCrPict col cr w
| dist (_crPos cr) (_cameraCenter w) > 1.5 * max (getWindowX w) (getWindowY w) = blank
| otherwise = pictures $
targetingPic ++
[ tr . setDepth 0 $ color yellow $ circleSolid 10
, tr . piercingMod $ bluntScale $ naked col cr
, tr $ torso (light4 col) (0,-crad) (0,crad)
, trFeet $ feet cr
, tr $ arms col cr
, tr $ drawEquipment cr
]
where
crad = _crRad cr
targetingPic = IM.elems $ IM.mapMaybeWithKey f $ _crInv cr