Tweak turrets

This commit is contained in:
2022-07-28 13:46:22 +01:00
parent 8aeabf3f6c
commit ec4ff84c46
10 changed files with 337 additions and 308 deletions
+7 -4
View File
@@ -1,7 +1,8 @@
module Dodge.Machine.Draw
where
import Dodge.Item.HeldOffset
import Dodge.Item.Draw.SPic
import Dodge.Placement.TopDecoration
--import Dodge.Placement.Instance.Turret
import Shape
import Picture
import Geometry
@@ -38,11 +39,13 @@ terminalShape mc = colorSH col (prismPoly
col = _mcColor mc
drawTurret :: Turret -> Machine -> SPic
drawTurret _ mc =
( rotateSH (- _mcDir mc) . colorSH (_mcColor mc) $ upperPrismPoly 20 (square w)
, mempty -- setLayer 5 $ scale 0.5 0.5 $ text $ show $ _mcDir mc )
drawTurret tu mc =
( colorSH (_mcColor mc) $ upperPrismPoly 20 (square w)
, mempty
)
<> overPosSP (turretItemOffset it tu mc) (itemSPic it)
where
it = _tuWeapon tu
w = _mcWidth mc
sensorSPic :: (PaletteColor, DecorationShape) -> Machine -> SPic