Work on sensor machines, remove some datatypes associated with placements

This commit is contained in:
2021-11-01 23:07:58 +00:00
parent 82de39657b
commit 7ef1da9be5
16 changed files with 265 additions and 220 deletions
+7 -3
View File
@@ -7,6 +7,7 @@ import Dodge.Room.Placement
import Dodge.Room.Foreground
import Dodge.Default.Room
import Dodge.Data
import Dodge.Placements
import Dodge.LevelGen.Data
import Dodge.LevelGen.Switch
import Dodge.RandomHelp
@@ -18,7 +19,8 @@ import System.Random
import Control.Monad.State
{- | A passage with a switch that opens forward access while closing backwards access. -}
airlock :: RandomGen g => State g Room
airlock = takeOne [airlock0,airlock90,airlockCrystal]
--airlock = takeOne [airlock0,airlock90,airlockCrystal]
airlock = takeOne [airlock0]
{- | Straight airlock -}
airlock0 :: Room
airlock0 = defaultRoom
@@ -27,8 +29,10 @@ airlock0 = defaultRoom
, _rmPath = [(V2 20 95,V2 20 45) ,(V2 20 45,V2 20 5) ]
, _rmPS =
[Placement (PS (V2 (-35) 50) (negate $ pi/2) $ PutButton $ makeSwitch col red id id)
$ \btid -> jspsJ (V2 0 20) 0 (PutDoubleDoor col (not . cond' btid) (V2 1 0) (V2 39 0) 2)
$ sPS (V2 0 80) 0 $ PutDoubleDoor col (cond' btid) (V2 1 0) (V2 39 0) 2
$ \btid -> Just $ putDoubleDoorThen col (not . cond' btid) (V2 (-1) 20) (V2 41 20) 2
$ Just $ putDoubleDoorThen col (cond' btid) (V2 (-1) 80) (V2 41 80) 2 Nothing
-- $ \btid -> jspsJ (V2 0 0) 0 (PutDoubleDoor col (not . cond' btid) (V2 1 20) (V2 39 20) 2)
-- $ sPS (V2 0 0) 0 $ PutDoubleDoor col (cond' btid) (V2 1 80) (V2 39 80) 2
,mountedLightI 70 (V2 (-2) 30) (V2 (-2) 70)
,sps0 $ PutForeground $ thinHighBar 75 (V2 40 50) (V2 (-1) 50)
]
+2 -5
View File
@@ -5,11 +5,8 @@ module Dodge.Room.Door
where
import Geometry
import Dodge.Room.Data
import Dodge.LevelGen.Data
import Dodge.Default.Room
--import Control.Monad.State
--import System.Random
import Dodge.Placements
door :: Room
door = defaultRoom
@@ -17,7 +14,7 @@ door = defaultRoom
, _rmLinks = lnks
, _rmPath = [(V2 20 35,V2 20 5)]
-- door extends into side walls (for shadows as rendered 12/03)
, _rmPS = [sPS (V2 0 20) 0 $ PutAutoDoor (V2 0 0) (V2 40 0)]
, _rmPS = [putAutoDoor (V2 0 20) (V2 40 20)]
, _rmBound = []
}
where lnks = [(V2 20 35,0)