Cleanup
This commit is contained in:
@@ -21,10 +21,7 @@ import Dodge.Data
|
|||||||
import Dodge.SoundLogic
|
import Dodge.SoundLogic
|
||||||
import Geometry
|
import Geometry
|
||||||
import Picture
|
import Picture
|
||||||
import ShapePicture
|
|
||||||
import Shape
|
|
||||||
|
|
||||||
import Control.Lens
|
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import qualified Data.Map.Strict as M
|
import qualified Data.Map.Strict as M
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ import ShapePicture
|
|||||||
import Shape
|
import Shape
|
||||||
import Geometry
|
import Geometry
|
||||||
|
|
||||||
import qualified IntMapHelp as IM
|
|
||||||
import Control.Lens
|
|
||||||
makeButton
|
makeButton
|
||||||
:: Color
|
:: Color
|
||||||
-> WorldEffect -- ^ Effect when pressed
|
-> WorldEffect -- ^ Effect when pressed
|
||||||
@@ -24,8 +22,6 @@ makeButton col eff = defaultButton
|
|||||||
, _btText = "Button"
|
, _btText = "Button"
|
||||||
, _btState = BtOff
|
, _btState = BtOff
|
||||||
}
|
}
|
||||||
where
|
|
||||||
btpos b w' = _btPos $ _buttons w' IM.! _btID b
|
|
||||||
|
|
||||||
|
|
||||||
drawSwitchWire :: Color -> Color -> Button -> SPic
|
drawSwitchWire :: Color -> Color -> Button -> SPic
|
||||||
@@ -51,8 +47,6 @@ makeSwitchSPic dswitch effOn effOff = defaultButton
|
|||||||
, _btText = "SWITCH/"
|
, _btText = "SWITCH/"
|
||||||
, _btState = BtOff
|
, _btState = BtOff
|
||||||
}
|
}
|
||||||
where
|
|
||||||
bpos b w = _btPos $ _buttons w IM.! _btID b
|
|
||||||
|
|
||||||
makeSwitch
|
makeSwitch
|
||||||
:: Color
|
:: Color
|
||||||
|
|||||||
@@ -4,11 +4,9 @@ import Dodge.LightSource
|
|||||||
import Color
|
import Color
|
||||||
import Geometry
|
import Geometry
|
||||||
import Dodge.LevelGen.Data
|
import Dodge.LevelGen.Data
|
||||||
--import Dodge.Default
|
|
||||||
import Dodge.LevelGen.Switch
|
import Dodge.LevelGen.Switch
|
||||||
import Dodge.Placement.Instance.LightSource
|
import Dodge.Placement.Instance.LightSource
|
||||||
import Dodge.PlacementSpot
|
import Dodge.PlacementSpot
|
||||||
import ShapePicture
|
|
||||||
|
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -30,7 +28,6 @@ triggerSwitchSPicLight sdraw ps = psPtCont ps (PutTrigger False)
|
|||||||
where
|
where
|
||||||
thels = lsColPosRad (V3 0.5 0 0) (V3 0 0 78) 75
|
thels = lsColPosRad (V3 0.5 0 0) (V3 0 0 78) 75
|
||||||
trigid tp = fromJust $ _plMID tp
|
trigid tp = fromJust $ _plMID tp
|
||||||
eff lsid tid b c = (triggers . ix tid .~ b)
|
|
||||||
oneff lsid tid = WorldEffects [SetLSCol (V3 0 0.5 0) lsid, SetTrigger True tid]
|
oneff lsid tid = WorldEffects [SetLSCol (V3 0 0.5 0) lsid, SetTrigger True tid]
|
||||||
offeff lsid tid = WorldEffects [SetLSCol (V3 0.5 0 0) lsid, SetTrigger False tid]
|
offeff lsid tid = WorldEffects [SetLSCol (V3 0.5 0 0) lsid, SetTrigger False tid]
|
||||||
|
|
||||||
|
|||||||
@@ -10,3 +10,4 @@ doWorldEffect we = case we of
|
|||||||
SetTrigger bool tid -> triggers . ix tid .~ bool
|
SetTrigger bool tid -> triggers . ix tid .~ bool
|
||||||
SetLSCol col lsid -> lightSources . ix lsid . lsParam . lsCol .~ col
|
SetLSCol col lsid -> lightSources . ix lsid . lsParam . lsCol .~ col
|
||||||
AccessTerminal mtmid -> accessTerminal mtmid
|
AccessTerminal mtmid -> accessTerminal mtmid
|
||||||
|
WorldEffects wes -> \w -> foldr doWorldEffect w wes
|
||||||
|
|||||||
Reference in New Issue
Block a user