Improve pulse laser/ball hit detection

This commit is contained in:
2026-03-26 15:07:33 +00:00
parent 40f5d22d88
commit c53e60b956
13 changed files with 193 additions and 185 deletions
+1 -3
View File
@@ -24,8 +24,6 @@ import Geometry
import LensHelp
import RandomHelp
-- TODO fix case where the sensor created by sensInsideDoor blocks another door
-- for roomRectAutoLinks-- make the locked door a center door?
sensorRoom :: SensorType -> Int -> State LayoutVars (Tree Room)
sensorRoom senseType n = do
rm <-
@@ -49,7 +47,7 @@ sensorRoom senseType n = do
| isclose = rl & rlType . at BlockedLink ?~ ()
| otherwise = rl
where
p' = p +.+ rotateV d (V2 0 (negate 100))
p' = p + rotateV d (V2 0 (negate 100))
isclose = dist (_rlPos rl) p' < 30
nonCornerLinks :: RoomLink -> Bool
+2 -2
View File
@@ -377,8 +377,8 @@ chasmSimpleMaze =
tutLight :: State LayoutVars (MetaTree Room String)
tutLight = do
x <- shuffleRoomPos =<< chasmSimpleMaze
y <- shuffleRoomPos =<< chasmSimpleMaze
x <- rmPos shuffle =<< chasmSimpleMaze
y <- rmPos shuffle =<< chasmSimpleMaze
z <- chasmSimpleMaze
return $
tToBTree "TutLight" $