Move towards allowing partial destruction of doors
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
-}
|
||||
module Dodge.Room.LongDoor where
|
||||
import Dodge.Data
|
||||
import Dodge.Default.Door
|
||||
import Dodge.Cleat
|
||||
import Dodge.RoomLink
|
||||
import Dodge.Base
|
||||
@@ -45,8 +46,8 @@ twinSlowDoorRoom w h x = defaultRoom
|
||||
, _rmPath = []
|
||||
, _rmPmnts =
|
||||
[ pContID (PS (V2 0 (h-5)) pi) ( PutButton $ makeButton col id)
|
||||
$ \btid -> jsps0J (PutSlideDr False col (cond' btid) 1 (V2 x 1) (V2 x h) wlSpeed)
|
||||
$ ps0 (PutSlideDr False col (cond' btid) 1 (V2 (-x) 1) (V2 (-x) h) wlSpeed)
|
||||
$ \btid -> jsps0J (PutSlideDr False col (thedoor btid) 1 (V2 x 1) (V2 x h))
|
||||
$ ps0 (PutSlideDr False col (thedoor btid) 1 (V2 (-x) 1) (V2 (-x) h))
|
||||
$ \did -> jps0' (PutLS (lsColPos (V3 0.75 0 0) (V3 0 (h-1) lampHeight)))
|
||||
$ \lspl -> jsps0 $ PutProp $ addColorChange (fromJust $ _plMID lspl) did $ lampCoverWhen (drmoving did) (V2 0 (h-1)) lampHeight
|
||||
]
|
||||
@@ -68,7 +69,9 @@ twinSlowDoorRoom w h x = defaultRoom
|
||||
[rectNSWE h 0 (-w) w
|
||||
,rectNSWE 20 (-h) (negate x) x
|
||||
]
|
||||
cond' btid w' = _btState (_buttons w' IM.! btid) /= BtOff
|
||||
thedoor btid = defaultDoor
|
||||
& drSpeed .~ wlSpeed
|
||||
& drTrigger .~ (\w' -> _btState (_buttons w' IM.! btid) /= BtOff)
|
||||
col = dim $ dim $ bright red
|
||||
|
||||
twinSlowDoorChasers :: RandomGen g => State g Room
|
||||
|
||||
@@ -12,6 +12,7 @@ module Dodge.Room.Procedural
|
||||
import Dodge.Data
|
||||
import Dodge.Placement.Shift
|
||||
import Dodge.Default.Wall
|
||||
import Dodge.Default.Door
|
||||
--import Shape.Data
|
||||
import Dodge.PlacementSpot
|
||||
import Dodge.Placement.Instance
|
||||
@@ -266,7 +267,9 @@ centerVaultRoom w h d = return $ defaultRoom
|
||||
col = dim $ dim $ bright red
|
||||
theDoor =
|
||||
[ pContID (PS (V2 35 (d+4)) 0) (PutButton $ makeSwitch col red id id)
|
||||
$ \btid -> jspsJ (V2 0 (d-10)) 0 (PutSlideDr False col (cond' btid) 1 (V2 (-21) 0) (V2 0 0) 2)
|
||||
$ sPS (V2 0 (d-10)) 0 (PutSlideDr False col (cond' btid) 1 (V2 21 0) (V2 0 0) 2)
|
||||
$ \btid -> jspsJ (V2 0 (d-10)) 0 (PutSlideDr False col (thedoor btid) 1 (V2 (-21) 0) (V2 0 0))
|
||||
$ sPS (V2 0 (d-10)) 0 (PutSlideDr False col (thedoor btid) 1 (V2 21 0) (V2 0 0))
|
||||
]
|
||||
cond' btid w' = _btState (_buttons w' IM.! btid) == BtOn
|
||||
thedoor btid = defaultDoor
|
||||
& drTrigger .~ (\w' -> _btState (_buttons w' IM.! btid) == BtOn)
|
||||
& drSpeed .~ 2
|
||||
|
||||
Reference in New Issue
Block a user