Refactor light sources
This commit is contained in:
@@ -46,7 +46,7 @@ twinSlowDoorRoom w h x = defaultRoom
|
||||
[ pContID (PS (V2 0 (h-5)) pi) ( PutButton $ makeButton col id)
|
||||
$ \btid -> jsps0J (PutSlideDr False col (cond' btid) (V2 x 1) (V2 x h) wlSpeed)
|
||||
$ ps0 (PutSlideDr False col (cond' btid) (V2 (-x) 1) (V2 (-x) h) wlSpeed)
|
||||
$ \did -> jps0 (PutLS (colorLightAt (V3 0.75 0 0) (V3 0 (h-1) lampHeight) 0))
|
||||
$ \did -> jps0 (PutLS (lsColPos (V3 0.75 0 0) (V3 0 (h-1) lampHeight)))
|
||||
$ \lsid -> jsps0 $ PutProp $ addColorChange lsid did $ lampCoverWhen (drmoving did) (V2 0 (h-1)) lampHeight
|
||||
]
|
||||
, _rmBound = ps
|
||||
@@ -58,8 +58,8 @@ twinSlowDoorRoom w h x = defaultRoom
|
||||
addColorChange lsid drid' = over pjUpdate $ dbArgChain $ const f
|
||||
where
|
||||
f w' | _drStatus (_doors w' IM.! drid') == DoorHalfway
|
||||
= w' & lightSources . ix lsid . lsIntensity .~ V3 8 0 0
|
||||
| otherwise = w' & lightSources . ix lsid . lsIntensity .~ 0.7
|
||||
= w' & lightSources . ix lsid . lsParam . lsCol .~ V3 8 0 0
|
||||
| otherwise = w' & lightSources . ix lsid . lsParam . lsCol .~ 0.7
|
||||
drmoving i w' = DoorHalfway == _drStatus (_doors w' IM.! i)
|
||||
lampHeight = 41
|
||||
ps =
|
||||
|
||||
Reference in New Issue
Block a user