Cleanup, merge modules

This commit is contained in:
2025-09-18 08:28:09 +01:00
parent f12ae3533c
commit 1564b1c721
23 changed files with 166 additions and 540 deletions
+3 -3
View File
@@ -7,8 +7,8 @@ import Dodge.Placement.Instance
--import Dodge.Terminal
import LensHelp
analyser :: ProximityRequirement -> PlacementSpot -> PlacementSpot -> Placement
analyser proxreq pslight psmc = extTrigLitPos pslight $ \tp ->
analyser :: ProximitySensorType -> PlacementSpot -> PlacementSpot -> Placement
analyser pst pslight psmc = extTrigLitPos pslight $ \tp ->
Just $
plSpot .~ psmc $
putTerminal (dark magenta)
@@ -20,4 +20,4 @@ analyser proxreq pslight psmc = extTrigLitPos pslight $ \tp ->
defaultMachine & mcColor .~ aquamarine
& mcType .~ McTerminal
& mcHP .~ 100
& mcType .~ McProxSensor (defaultProximitySensor{_proxRequirement = proxreq})
& mcType .~ McProxSensor (ProxSensor pst False)
+2 -2
View File
@@ -76,8 +76,8 @@ divideDoorPane mid wl cond soff speed ppairs g = case ppairs of
& drPushedBy .~ maybe PushesItself PushedBy mid
putAutoDoor :: Point2 -> Point2 -> Placement
putAutoDoor a b = Placement 0 (PS 0 0) (PutCoord a) Nothing $ \_ apl ->
Just $ Placement 0 (PS 0 0) (PutCoord b) Nothing $ \w bpl ->
putAutoDoor a b = Placement (PS 0 0) (PutCoord a) Nothing $ \_ apl ->
Just $ Placement (PS 0 0) (PutCoord b) Nothing $ \w bpl ->
let x = w ^?! coordinates . ix (apl ^?! plMID . _Just)
y = w ^?! coordinates . ix (bpl ^?! plMID . _Just)
in Just $ putDoubleDoor
+1 -1
View File
@@ -174,7 +174,7 @@ spanLSLightI ls h a b =
spanLS :: LightSource -> Point2 -> Point2 -> Placement
spanLS ls a b =
Placement 10 (PS (V2 x y) 0) (PutLS ls) Nothing $
Placement (PS (V2 x y) 0) (PutLS ls) Nothing $
const $ const $ Just $ sps0 $ putShape $ thinHighBar h a b
where
V3 _ _ h = _lsPos (_lsParam ls) + 5
@@ -1,4 +1,4 @@
module Dodge.Placement.Instance.LightSource.Flicker where
module Dodge.Placement.Instance.LightSource.Flicker (flickerMod, flickerUpdate) where
import Control.Lens
import Data.Maybe
@@ -30,7 +30,7 @@ flickerUpdate md w
%~ ((mdTimer .~ newtime) . (mdPoint3 .~ lscol) . (mdBool %~ not))
where
mdcol = _mdPoint3 md
lscol = w ^?! cWorld . lWorld . lightSources . ix lsid . lsParam . lsCol -- _lsCol $ _lsParam $ _lightSources w IM.! lsid
lscol = w ^?! cWorld . lWorld . lightSources . ix lsid . lsParam . lsCol
lsid = _mdExternalID md
mdid = _mdID md
timerange