Try to simplify link code in roomRect
This commit is contained in:
@@ -20,7 +20,7 @@ roomNgon n x = do
|
||||
defaultRoom
|
||||
{ _rmPolys = [poly]
|
||||
, _rmLinks = map f lnks
|
||||
, _rmPath = linksGridToPath (map f lnks) path4
|
||||
, _rmPath = linksDAGToPath (map f lnks) path3
|
||||
, _rmPmnts = [thelight]
|
||||
, _rmBound = [poly]
|
||||
, _rmFloor = Tiled [makeTileFromPoly poly 2]
|
||||
@@ -34,7 +34,6 @@ roomNgon n x = do
|
||||
path1 = polyOrthDist n (x-10)
|
||||
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)]
|
||||
|
||||
Reference in New Issue
Block a user