This commit is contained in:
2022-07-21 18:26:48 +01:00
parent b58444f931
commit 14f3c8bc52
4 changed files with 1 additions and 12 deletions
-3
View File
@@ -21,10 +21,7 @@ import Dodge.Data
import Dodge.SoundLogic
import Geometry
import Picture
import ShapePicture
import Shape
import Control.Lens
import qualified Data.Text as T
import qualified Data.Map.Strict as M
-6
View File
@@ -12,8 +12,6 @@ import ShapePicture
import Shape
import Geometry
import qualified IntMapHelp as IM
import Control.Lens
makeButton
:: Color
-> WorldEffect -- ^ Effect when pressed
@@ -24,8 +22,6 @@ makeButton col eff = defaultButton
, _btText = "Button"
, _btState = BtOff
}
where
btpos b w' = _btPos $ _buttons w' IM.! _btID b
drawSwitchWire :: Color -> Color -> Button -> SPic
@@ -51,8 +47,6 @@ makeSwitchSPic dswitch effOn effOff = defaultButton
, _btText = "SWITCH/"
, _btState = BtOff
}
where
bpos b w = _btPos $ _buttons w IM.! _btID b
makeSwitch
:: Color
-3
View File
@@ -4,11 +4,9 @@ import Dodge.LightSource
import Color
import Geometry
import Dodge.LevelGen.Data
--import Dodge.Default
import Dodge.LevelGen.Switch
import Dodge.Placement.Instance.LightSource
import Dodge.PlacementSpot
import ShapePicture
import Data.Maybe
import Control.Lens
@@ -30,7 +28,6 @@ triggerSwitchSPicLight sdraw ps = psPtCont ps (PutTrigger False)
where
thels = lsColPosRad (V3 0.5 0 0) (V3 0 0 78) 75
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]
offeff lsid tid = WorldEffects [SetLSCol (V3 0.5 0 0) lsid, SetTrigger False tid]
+1
View File
@@ -10,3 +10,4 @@ doWorldEffect we = case we of
SetTrigger bool tid -> triggers . ix tid .~ bool
SetLSCol col lsid -> lightSources . ix lsid . lsParam . lsCol .~ col
AccessTerminal mtmid -> accessTerminal mtmid
WorldEffects wes -> \w -> foldr doWorldEffect w wes