Add indexed world modifications, example use in flicker lights
This commit is contained in:
@@ -14,7 +14,7 @@ import Data.Maybe
|
||||
import Control.Lens
|
||||
|
||||
triggerSwitchSPic :: (Button -> SPic) -> PlacementSpot -> Placement
|
||||
triggerSwitchSPic sdraw ps = plCont ps (PutTrigger (const False))
|
||||
triggerSwitchSPic sdraw ps = psPtCont ps (PutTrigger (const False))
|
||||
$ \tp -> Just $ pContID ps (PutButton (makeSwitchSPic sdraw (oneff $ trigid tp) (offeff $ trigid tp)))
|
||||
(const Nothing)
|
||||
where
|
||||
@@ -23,7 +23,7 @@ triggerSwitchSPic sdraw ps = plCont ps (PutTrigger (const False))
|
||||
offeff tid = triggers . ix tid .~ const False
|
||||
|
||||
triggerSwitchSPicLight :: (Button -> SPic) -> PlacementSpot -> Placement
|
||||
triggerSwitchSPicLight sdraw ps = plCont ps (PutTrigger (const False))
|
||||
triggerSwitchSPicLight sdraw ps = psPtCont ps (PutTrigger (const False))
|
||||
$ \tp -> Just $ pContID fstLnkOut (PutLS thels)
|
||||
$ \lsid -> Just
|
||||
$ pContID ps (PutButton (makeSwitchSPic sdraw (oneff lsid $ trigid tp) (offeff lsid $ trigid tp)))
|
||||
@@ -37,7 +37,7 @@ triggerSwitchSPicLight sdraw ps = plCont ps (PutTrigger (const False))
|
||||
offeff lsid tid = eff lsid tid False (V3 0.5 0 0)
|
||||
|
||||
triggerSwitch :: Color -> PlacementSpot -> Placement
|
||||
triggerSwitch col ps = plCont ps (PutTrigger (const False))
|
||||
triggerSwitch col ps = psPtCont ps (PutTrigger (const False))
|
||||
$ \tp -> Just $ pContID ps (PutButton (makeSwitch col col (oneff $ trigid tp) (offeff $ trigid tp)))
|
||||
(const Nothing)
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user