Simplify block drawing further, store shape of block
This commit is contained in:
+4
-25
@@ -1,5 +1,7 @@
|
||||
module Dodge.Room.Tanks where
|
||||
|
||||
import Color
|
||||
import Control.Monad
|
||||
import Dodge.Base.CardinalPoint
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
@@ -14,7 +16,6 @@ import Geometry
|
||||
import LensHelp
|
||||
import RandomHelp
|
||||
import Shape
|
||||
import Control.Monad
|
||||
|
||||
randomTank :: RandomGen g => State g Placement
|
||||
randomTank =
|
||||
@@ -37,18 +38,7 @@ randEdgeTank = do
|
||||
return $
|
||||
basetank
|
||||
& plType . putBlock . blDraw
|
||||
%~ ( \bd ->
|
||||
BlockDraws
|
||||
[ bd
|
||||
, BlockDrawBlSh
|
||||
( colorSH
|
||||
orange
|
||||
( verticalPipe 80
|
||||
<> horPipe 80 0 (70 *.* cardVec edge)
|
||||
)
|
||||
)
|
||||
]
|
||||
)
|
||||
<>~ colorSH orange (verticalPipe 80 <> horPipe 80 0 (70 *.* cardVec edge))
|
||||
-- %~ fmap (<> noPic ( colorSH orange (verticalPipe 80
|
||||
-- <> horPipe 80 0 (70 *.* cardVec edge))))
|
||||
-- 70 is a guess, the true value depends on the distance to the wall
|
||||
@@ -67,18 +57,7 @@ randEdgeTanks i = do
|
||||
replicate i $
|
||||
basetank
|
||||
& plType . putBlock . blDraw
|
||||
%~ ( \bd ->
|
||||
BlockDraws
|
||||
[ bd
|
||||
, BlockDrawBlSh
|
||||
( colorSH
|
||||
orange
|
||||
( verticalPipe 80
|
||||
<> horPipe 80 0 (70 *.* cardVec edge)
|
||||
)
|
||||
)
|
||||
]
|
||||
)
|
||||
<>~ colorSH orange (verticalPipe 80 <> horPipe 80 0 (70 *.* cardVec edge))
|
||||
-- 70 is a guess, the true value depends on the distance to the wall
|
||||
& plSpot
|
||||
.~ rprBool
|
||||
|
||||
Reference in New Issue
Block a user