Allow to log position of placement spot

This commit is contained in:
2025-09-29 22:34:44 +01:00
parent bf9a2250da
commit a2eb0e026b
13 changed files with 180 additions and 152 deletions
+9 -6
View File
@@ -1,3 +1,4 @@
{-# LANGUAGE TupleSections #-}
module Dodge.Room.LasTurret where
--import Dodge.Item.Held.Cane
@@ -27,7 +28,7 @@ cenLasTur = do
roomNgon 8 200 <&> rmPmnts
.~ [ putLasTurret 0.02
, heightWallPS
(resetPLUse $ rprBoolShift (const . isInLnk) (shiftInBy 100))
(resetPLUse $ rprBoolShift (const . isInLnk) (shiftInBy 100 <&> (,S.singleton UsedPosLow)))
30
covershape
, thelight
@@ -60,7 +61,7 @@ lightSensByDoor i rm =
-- & rmOutPmnt . at i ?~ sensAboveDoor LaserSensor 20 (atFstLnkOutShiftBy sensorshift)
covershape = rectNSWE 10 (-10) (-20) 20
sensorshift (p, a) = (p +.+ rotateV a (V2 60 (-20)), a)
sensorshift (p, a) = ((p +.+ rotateV a (V2 60 (-20)), a),S.singleton UsedPosLow)
keyCardRoomRunPast :: RandomGen g => Int -> Int -> State g (MetaTree Room String)
keyCardRoomRunPast keyid rmid = do
@@ -87,12 +88,13 @@ analyserByNthLink n proxreq i rm =
.++~ [ psPt (atNthLinkOut n) $ PutForeground $ verticalWire (V2 20 0) 0 80
, analyser
(SensorWithRequirement proxreq)
(atNthLnkOutShiftBy n (\(p, a) -> (p +.+ rotateV a (V2 18.5 (-2.5)), a)))
(atNthLnkOutShiftBy n (\(p, a) ->
((p +.+ rotateV a (V2 18.5 (-2.5)), a), S.singleton UsedPosLow)))
(atNthLnkOutShiftBy n sensorshift)
& plExternalID ?~ i
]
where
sensorshift (p, a) = (p +.+ rotateV a (V2 (-30) (-10)), a)
sensorshift (p, a) = ((p +.+ rotateV a (V2 (-30) (-10)), a), S.singleton UsedPosLow)
analyserByNthLinkWithPrompt ::
Int -> [TerminalLine] -> ProximityRequirement -> Int -> Placement
@@ -103,12 +105,13 @@ analyserByNthLinkWithPrompt n l proxreq i =
analyserWithPrompt
l
(SensorWithRequirement proxreq)
(atNthLnkOutShiftBy n (\(p, a) -> (p +.+ rotateV a (V2 18.5 (-2.5)), a)))
(atNthLnkOutShiftBy n (\(p, a) ->
((p +.+ rotateV a (V2 18.5 (-2.5)), a),S.singleton UsedPosLow)))
(atNthLnkOutShiftBy n sensorshift)
& plExternalID ?~ i
-- ]
where
sensorshift (p, a) = (p +.+ rotateV a (V2 (-30) (-10)), a)
sensorshift (p, a) = ((p +.+ rotateV a (V2 (-30) (-10)), a), S.singleton UsedPosLow)
analyserByDoor :: ProximityRequirement -> Int -> Room -> Room
analyserByDoor = analyserByNthLink 0