Make chasms remove RoomPos within their boundaries
This commit is contained in:
@@ -25,6 +25,7 @@ roomNgon n x = do
|
||||
, _rmBound = [poly]
|
||||
, _rmFloor = Tiled [makeTileFromPoly poly 2]
|
||||
, _rmName = show n ++ "gon"
|
||||
, _rmPos = poss
|
||||
}
|
||||
where
|
||||
rot = 2 * pi / fromIntegral n
|
||||
@@ -34,6 +35,8 @@ roomNgon n x = do
|
||||
path2 = concat $ zipWith g path1 (tail path1 <> [head path1])
|
||||
path3 = loopPairs path2 <> fmap (,V2 0 0) path2
|
||||
path4 = concatMap doublePair path3
|
||||
poss = map (\p -> RoomPos p 0 mempty (NotLink True) mempty)
|
||||
(V2 0 0 : path1)
|
||||
g z y = [z, 0.5 * (z + y)]
|
||||
lnks =
|
||||
sortOn ((\(V2 a b) -> (negate b, a)) . fst . snd)
|
||||
|
||||
Reference in New Issue
Block a user