Make zoning more universal
This commit is contained in:
@@ -108,7 +108,7 @@ drawInspectWall :: World -> Wall -> Picture
|
||||
drawInspectWall _ wl = setLayer DebugLayer $
|
||||
color rose (thickLine 3 [a,b])
|
||||
<> foldMap (drawZone wlZoneSize)
|
||||
(runIdentity $ S.toList_ $ zoneOfWall wl)
|
||||
(runIdentity $ S.toList_ $ zoneOfWall wlZoneSize wl) -- this won't work if wlZoneSize is not consistent
|
||||
where
|
||||
(a,b) = _wlLine wl
|
||||
-- $ line [a,b]
|
||||
|
||||
@@ -26,7 +26,7 @@ wallsToDraw w
|
||||
<*> L.prefilter wlSeeThroughDraw (L.premap f L.list)
|
||||
<*> L.premap getWallSPic L.mconcat
|
||||
) (S.concat $ S.mapMaybe g $ zoneOfSight wlZoneSize w)
|
||||
g (V2 i j) = w ^? wallsZone . znObjects . ix i . ix j
|
||||
g (V2 i j) = w ^? wlZoning . znObjects . ix i . ix j
|
||||
|
||||
wlOpaqueDraw :: Wall -> Bool
|
||||
wlOpaqueDraw wl = wlIsOpaque wl && _wlDraw wl
|
||||
|
||||
Reference in New Issue
Block a user