Draw barrels properly

This commit is contained in:
2025-06-14 23:38:46 +01:00
parent 078a3cc7ea
commit 3f9b76b8d0
3 changed files with 19 additions and 14 deletions
+16 -11
View File
@@ -37,21 +37,26 @@ worldSPic cfig u =
pointIsClose = cullPoint cfig w
drawCreature :: Creature -> SPic
drawCreature cr = case _crType cr of
BarrelCrit{} ->
picAtCrPos1
( setDepth 20 $
fold
[ color orange $ circleSolid 10
, setDepth 0.049 . color (greyN 0.5) $ circleSolid 8
, color (greyN 0.5) $ circleSolid 8
]
)
cr
drawCreature cr = case cr ^. crType of
BarrelCrit{} ->
uncurryV translateSPxy (_crPos cr) $ rotateSP (_crDir cr)
$ barrelShape
-- picAtCrPos1
-- ( setDepth 20 $
-- fold
-- [ color orange $ circleSolid 10
-- , setDepth 0.049 . color (greyN 0.5) $ circleSolid 8
-- , color (greyN 0.5) $ circleSolid 8
-- ]
-- )
-- cr
LampCrit{_lampHeight = h} -> uncurryV translateSPxy (_crPos cr) $ lampCrSPic h
_ -> basicCrPict cr
-- NonDrawnCreature -> mempty
barrelShape :: SPic
barrelShape = noPic $ upperPrismPoly Medium Important 20 $ polyCirc 3 10
lampCrSPic :: Float -> SPic
lampCrSPic h =
colorSH blue (upperBox Small Typical h $ rectWH 5 5)