Fix console item creation, fix tank object clockwise orientation

This commit is contained in:
2024-06-11 14:19:31 +01:00
parent c862c862df
commit 935f09f08e
7 changed files with 11 additions and 33 deletions
+1 -17
View File
@@ -17,27 +17,11 @@ tankSquareDec ::
Color ->
Color ->
Placement
tankSquareDec dec = tankShape (reverse $ square 20) (dec 20 20 31)
tankSquareDec dec = tankShape (reverse . orderPolygon $ square 20) (dec 20 20 31)
tankShape :: [Point2] -> (Color -> Color -> Shape) -> Color -> Color -> Placement
tankShape baseshape facade col col' = sps0 $ decoratedBlock (BlShConst $ facade col col') Metal col 31 baseshape
-- = sps0 $ PutBlock bl wl $ reverse baseshape
-- where
-- bl = defaultBlock
-- & blDraw .~ const (noPic $ colorSH col (upperPrismPoly 31 $ reverse baseshape) <> facade col col')
-- & blDeath .~ const id
-- wl = defaultWall
-- & wlColor .~ col
-- & wlRotateTo .~ False
-- & wlOpacity .~ SeeAbove
-- & wlMaterial .~ Metal
-- = ps0jPushPS
-- (PutShape $ colorSH col (upperPrismPoly 31 baseshape) <> facade col col')
-- $ sps0 $ PutWall baseshape defaultWall
-- {_wlUnshadowed = False, _wlColor = col, _wlRotateTo = False, _wlOpacity = SeeAbove}
roundTank :: Color -> Color -> Placement
roundTank = tankShape (polyCirc 4 20) $
\_ c' -> colorSH c' $ foldMap toprail (take 8 [0, pi / 4 ..])