Cleanup, merge modules
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user