Move machine update into outside function

This commit is contained in:
2022-07-14 21:01:53 +01:00
parent ad33ddd569
commit 5463328d41
13 changed files with 130 additions and 92 deletions
+3 -2
View File
@@ -21,7 +21,7 @@ import LensHelp
import RandomHelp
import qualified Data.Set as S
import Data.Maybe
--import Data.Maybe
cenLasTur :: Room
cenLasTur = roomNgon 8 200 & rmPmnts .~
@@ -44,7 +44,8 @@ lightSensInsideDoor outplid rm = rm
lasSensLightAboveDoor :: Float -> PlacementSpot -> Placement
lasSensLightAboveDoor wth ps = extTrigLitPos
(atFstLnkOutShiftBy (\(p,a) -> (p +.+ rotateV a (V2 18.5 (-2.5)), a)))
( \tp -> Just $ lightSensor wth (upf $ fromJust $ _plMID tp) ps )
( \tp -> Just $ lightSensor wth (_plMID tp) --(upf $ fromJust $ _plMID tp)
ps )
where
upf trid mc w | _sensAmount (_mcSensor mc) > 900 = w & triggers . ix trid .~ const True
| otherwise = w