Refactor doors
This commit is contained in:
@@ -28,8 +28,6 @@ import LensHelp
|
||||
|
||||
import qualified Data.Set as S
|
||||
import Data.Maybe
|
||||
--import Data.Tree
|
||||
import qualified IntMapHelp as IM
|
||||
|
||||
twinSlowDoorRoom
|
||||
:: Float -- ^ Half width
|
||||
@@ -67,7 +65,7 @@ twinSlowDoorRoom w h x = defaultRoom
|
||||
]
|
||||
thedoor btid = defaultDoor
|
||||
& drSpeed .~ wlSpeed
|
||||
& drTrigger .~ (\w' -> _btState (_buttons w' IM.! btid) /= BtOff)
|
||||
& drTrigger .~ WdBlBtNotOff btid
|
||||
col = dim $ dim $ bright red
|
||||
|
||||
twinSlowDoorChasers :: RandomGen g => State g Room
|
||||
@@ -113,7 +111,7 @@ addButtonSlowDoor x h rm = do
|
||||
thewall = switchWallCol red
|
||||
butDoor = putLitButOnPos col
|
||||
(rprBool (isUnusedLnkType InLink))
|
||||
$ \btplmnt -> Just $ putDoubleDoorThen DoorObstacle thewall (cond' $ fromJust $ _plMID btplmnt)
|
||||
$ \btplmnt -> Just $ putDoubleDoorThen DoorObstacle thewall (WdBlBtNotOff $ fromJust $ _plMID btplmnt)
|
||||
30 (V2 0 h) (V2 x h) 2
|
||||
$ \dr1 dr2 ->
|
||||
amountedlight dr1 50
|
||||
@@ -122,7 +120,6 @@ addButtonSlowDoor x h rm = do
|
||||
$ amountedlight dr2 (-50)
|
||||
Nothing
|
||||
col = dim $ light red
|
||||
cond' btid w = w ^? buttons . ix btid . btState /= Just BtOff
|
||||
|
||||
slowDoorRoom :: RandomGen g => State g Room
|
||||
slowDoorRoom = do
|
||||
|
||||
Reference in New Issue
Block a user