Commit before trying to add machine footprint

This commit is contained in:
2026-03-31 13:57:48 +01:00
parent 6bcf03b30d
commit dea4c0dffe
10 changed files with 44 additions and 44 deletions
-4
View File
@@ -113,7 +113,6 @@ analyserByNthLink :: Int -> ProximityRequirement -> Int -> Placement
analyserByNthLink n proxreq i =
analyser
(SensorWithRequirement proxreq)
-- (byNthLink n)
( atNthLnkOutShiftBy
n
( \(p, a) ->
@@ -121,11 +120,8 @@ analyserByNthLink n proxreq i =
)
)
(byNthLink n)
-- (atNthLnkOutShiftBy n sensorshift)
& plExternalID
?~ i
where
sensorshift (p, a) = ((p +.+ rotateV a (V2 (-30) (-10)), a), S.singleton UsedPosLow)
analyserByDoor :: ProximityRequirement -> Int -> Room -> Room
analyserByDoor pr i = rmPmnts .:~ analyserByNthLink 0 pr i
+2 -29
View File
@@ -52,7 +52,7 @@ addDoorAtNthLinkToggleInterrupt j x i =
outplace =
extTrigLitPos
(atNthLnkOutShiftBy j (\(p, a) -> ((p + rotateV a (V2 18.5 (-2.5)), a), S.singleton UsedPosLow)))
( Just . set plSpot (rprShift (moveToSideNthOutLink (S.singleton UsedPosLow) j))
( Just . set plSpot (byNthLink j)
. putInterrupt
)
& plExternalID
@@ -71,7 +71,7 @@ addDoorAtNthLinkToggleTerminal j xs i =
outplace =
extTrigLitPos
(atNthLnkOutShiftBy j (\(p, a) -> ((p +.+ rotateV a (V2 18.5 (-2.5)), a), S.singleton UsedPosLow)))
( Just . set plSpot (rprShift (moveToSideNthOutLink (S.singleton UsedPosLow) j))
( Just . set plSpot (byNthLink j)
. putMessageTerminal
. termMessages
)
@@ -119,30 +119,3 @@ moveToSideNthOutLink xs i rp rm = do
-- complicated, it should really use created walls...
((rtpos, rpdir), xs)
else ((ltpos, rpdir), xs)
--moveToSideFirstOutLink :: RoomPos -> Room -> Maybe (Point2, Float)
--moveToSideFirstOutLink rp rm = do
-- 0 <- rp ^? rpLinkStatus . rplsChildNum
-- let rppos = _rpPos rp
-- rpdir = _rpDir rp
-- inpos = rppos +.+ rotateV rpdir (V2 0 (-12.5))
-- rtpos = inpos +.+ rotateV rpdir (V2 30 0)
-- ltpos = inpos +.+ rotateV rpdir (V2 (-30) 0)
-- return $ if any (isJust . intersectSegPolyFirst inpos ltpos) (_rmPolys rm)
-- then -- the above test may not work properly if the room polys are
-- -- complicated, it should really use created walls...
-- (rtpos, rpdir)
-- else (ltpos, rpdir)
--moveToSideFirstOutLink rp rm = case rp ^? rpLinkStatus . rplsChildNum of
-- Just 0 ->
-- let rppos = _rpPos rp
-- rpdir = _rpDir rp
-- inpos = rppos +.+ rotateV rpdir (V2 0 (-12.5))
-- rtpos = inpos +.+ rotateV rpdir (V2 30 0)
-- ltpos = inpos +.+ rotateV rpdir (V2 (-30) 0)
-- in if any (isJust . intersectSegPolyFirst inpos ltpos) (_rmPolys rm)
-- then -- the above test may not work properly if the room polys are
-- -- complicated, it should really use created walls...
-- Just (rtpos, rpdir)
-- else Just (ltpos, rpdir)
-- _ -> Nothing