Add indicator light to switch doors
This commit is contained in:
+8
-1
@@ -14,6 +14,7 @@ import Dodge.Bounds
|
||||
import Dodge.Default.Wall
|
||||
import Dodge.Room.Link
|
||||
import Geometry
|
||||
import Geometry.Vector3D
|
||||
import Geometry.ConvexPoly
|
||||
import qualified IntMapHelp as IM
|
||||
import Tile
|
||||
@@ -66,6 +67,12 @@ placeRoomWires rm w = IM.foldr ($) w
|
||||
$ IM.intersectionWith (placeWire rm) (_rmStartWires rm) (_rmEndWires rm)
|
||||
|
||||
placeWire :: Room -> RoomWire -> RoomWire -> World -> World
|
||||
placeWire rm (WallWire p a h) wr = placeWire rm wr (RoomWire p a) .
|
||||
(foregroundShape %~ (colorSH red (barPP 1.5 (addZ h p') (addZ 80 p')) <>)
|
||||
)
|
||||
where
|
||||
p' = shiftPointBy (_rmShift rm) p
|
||||
placeWire rm rw1 rw2@WallWire{} = placeWire rm rw2 rw1
|
||||
placeWire rm (RoomWire p _) (RoomWire q _) = foregroundShape
|
||||
%~ ((col $ thinHighBarChain 80 $ map (shiftPointBy rs) doOrdering) <>)
|
||||
where
|
||||
@@ -73,7 +80,7 @@ placeWire rm (RoomWire p _) (RoomWire q _) = foregroundShape
|
||||
--rmWalls = foldr cutWalls [] (_rmPolys rm)
|
||||
doOrdering = orderPolygonAround rmcen (p:q:ps)
|
||||
col | clockwise = colorSH red
|
||||
| otherwise = colorSH orange
|
||||
| otherwise = colorSH red
|
||||
rmps = concat $ _rmPolys rm
|
||||
rmcen = centroid rmps
|
||||
clockwise = isLHS rmcen p q
|
||||
|
||||
Reference in New Issue
Block a user