Add laser central room, using new placement/roompos functionality
This commit is contained in:
+24
-6
@@ -1,6 +1,7 @@
|
||||
module Dodge.Room.Start
|
||||
where
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.PlacementSpot
|
||||
import Dodge.Room.RunPast
|
||||
import Dodge.Data
|
||||
import Dodge.Default
|
||||
@@ -19,11 +20,13 @@ import Dodge.Item.Random
|
||||
import Dodge.Item.Weapon.BulletGuns
|
||||
import Dodge.Item.Weapon.Utility
|
||||
--import Dodge.LevelGen.Data
|
||||
import Geometry.Data
|
||||
--import Geometry.Data
|
||||
import Geometry
|
||||
import Padding
|
||||
import Color
|
||||
import Shape
|
||||
|
||||
import Data.Maybe
|
||||
import Data.Tree
|
||||
import Control.Monad.State
|
||||
import Control.Lens
|
||||
@@ -48,12 +51,27 @@ minigunfakeout = do
|
||||
`treeFromPost` Right door
|
||||
|
||||
centralLasTurret :: Room
|
||||
centralLasTurret = roomNgon 8
|
||||
|
||||
centralLasTurret = roomNgon 8 200 & rmPmnts .~
|
||||
[ putLasTurret
|
||||
, heightWall 30 (rectNSEW (-90) (-110) 10 (-10))
|
||||
, spanColLightI 0.5 100 (V2 0 (-5)) (V2 0 5)
|
||||
]
|
||||
& rmExtPmnt ?~
|
||||
--extTrigLitPos (PS (V2 200 0) 0)
|
||||
--extTrigLitPos (anyLnkInPS 5)
|
||||
extTrigLitPos fstLnkOut
|
||||
( \tp -> Just $ lightSensor (upf $ fromJust $ _plMID tp) (V2 100 0) 0
|
||||
)
|
||||
where
|
||||
upf trid mc w | _mcSensor mc > 90 = w & triggers . ix trid .~ const True
|
||||
| otherwise = w
|
||||
rezThenLasTurret :: RandomGen g => State g (Tree (Either Room Room))
|
||||
rezThenLasTurret = do
|
||||
rbox <- rezBoxStart
|
||||
return $ rbox `appendEitherTree` [return $ Right centralLasTurret]
|
||||
rbox <- rezBoxStart
|
||||
let cenroom = centralLasTurret {_rmLabel = Just 0}
|
||||
doorroom = switchDoorRoom {_rmTakeFrom = Just 0}
|
||||
contTree = treeFromPost [Left cenroom] (Right doorroom)
|
||||
return $ rbox `appendEitherTree` [contTree]
|
||||
|
||||
startRoom :: RandomGen g => State g (Tree (Either Room Room))
|
||||
startRoom = join $ takeOne
|
||||
@@ -193,7 +211,7 @@ startRoom' = do
|
||||
, tankSquareEmboss4 (dim orange) 50 (h-60)
|
||||
, tankSquare (dim orange) 50 50
|
||||
, tankSquare (dim orange) 50 120
|
||||
, lightSensor (V2 (0.8*w) (0.25*h)) 0
|
||||
, lightSensor (const id) (V2 (0.8*w) (0.25*h)) 0
|
||||
, putLasTurret & plSpot .~ PS (V2 (0.8*w) (0.8*h)) 0
|
||||
, sps0 $ PutForeground $ colorSH orange $ pipePP 2 (V3 50 50 25) (V3 50 120 25)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user