Cleanup
This commit is contained in:
@@ -12,7 +12,6 @@ import ShapePicture
|
||||
|
||||
import Data.Maybe
|
||||
import Control.Lens
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
|
||||
triggerSwitchSPic :: (Button -> SPic) -> PlacementSpot -> Placement
|
||||
triggerSwitchSPic sdraw ps = psPtCont ps (PutTrigger False)
|
||||
@@ -69,7 +68,7 @@ extTrigLitPos ps f = psPtCont ps (PutTrigger False)
|
||||
{_mdID = 0
|
||||
,_mdExternalID1 = lsid
|
||||
,_mdExternalID2 = fromJust $ _plMID tp
|
||||
,_mdUpdate = \md w -> if (_triggers w IM.! _mdExternalID2 md)
|
||||
,_mdUpdate = \md w -> if w ^?! triggers . ix (_mdExternalID2 md)
|
||||
then w & lightSources . ix (_mdExternalID1 md) . lsParam . lsCol .~ V3 0 0.5 0
|
||||
else w & lightSources . ix (_mdExternalID1 md) . lsParam . lsCol .~ V3 0.5 0 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user