Start simplifying Prop
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
-- | Rooms containing long doors, probably with a big reveal behind them.
|
||||
module Dodge.Room.LongDoor where
|
||||
|
||||
import Linear
|
||||
import Dodge.Door.PutSlideDoor
|
||||
import Dodge.Default.Wall
|
||||
import Control.Monad
|
||||
@@ -77,7 +78,6 @@ twinSlowDoorRoom w h x =
|
||||
thedoor btid =
|
||||
defaultDoor
|
||||
& drUpdate . drLerpSpeed .~ wlSpeed
|
||||
-- & drTrigger .~ WdBlBtNotOff btid
|
||||
& drTrigger .~ WdBlBtOn btid
|
||||
col = dim $ dim $ bright red
|
||||
|
||||
@@ -101,23 +101,19 @@ addSouthPillars x h r = do
|
||||
addButtonSlowDoor :: RandomGen g => Float -> Float -> Room -> State g Room
|
||||
addButtonSlowDoor x h rm = do
|
||||
shuffleLinks $
|
||||
setOutLinksPD aboveH $
|
||||
setInLinksPD belowH $
|
||||
setOutLinksPD (f (> h + 40)) $
|
||||
setInLinksPD (f (< h - 40)) $
|
||||
rm
|
||||
& rmPmnts .++~ [butDoor, theterminal]
|
||||
& rmBound .:~ openDoorBound
|
||||
where
|
||||
f g y = g $ y ^. _1 . _y
|
||||
theterminal =
|
||||
putMessageTerminal terminalColor (simpleTermMessage themessage)
|
||||
& plSpot .~ rprBoolShift (isUnusedLnkType InLink)
|
||||
(shiftByV2 (V2 0 (-10)) <&> (,S.singleton UsedPosLow))
|
||||
themessage =
|
||||
[ "WARNING:"
|
||||
, "LARGE BIOMASS DETECTED"
|
||||
]
|
||||
themessage = [ "WARNING:" , "LARGE BIOMASS DETECTED" ]
|
||||
openDoorBound = reverse $ rectNSWE (h + 5) (h - 5) (3 * x / 2) (- x / 2)
|
||||
belowH y = (sndV2 . fst) y < h - 40
|
||||
aboveH y = (sndV2 . fst) y > h + 40
|
||||
amountedlight dr xoff mpl = Just
|
||||
. moveLSThen
|
||||
(WdP2fDoorPosition (fromJust $ _plMID dr))
|
||||
@@ -130,10 +126,8 @@ addButtonSlowDoor x h rm = do
|
||||
setmount pldr plls plpr =
|
||||
cWorld . lWorld . doors . ix (fromJust $ _plMID pldr) . drMounts
|
||||
.++~ [MountedLS (fromJust $ _plMID plls), MountedProp (fromJust $ _plMID plpr)]
|
||||
-- TODO make the height of this light source and of other mounted lights
|
||||
-- be taken from a single consistent source
|
||||
butDoor = putLitButOnPos
|
||||
col
|
||||
(dim $ light red)
|
||||
(rprBool (isUnusedLnkType InLink))
|
||||
$ \btplmnt -> Just $
|
||||
putDoubleDoorThen
|
||||
@@ -151,7 +145,6 @@ addButtonSlowDoor x h rm = do
|
||||
dr2
|
||||
(-50)
|
||||
Nothing
|
||||
col = dim $ light red
|
||||
|
||||
slowDoorRoom :: RandomGen g => State g Room
|
||||
slowDoorRoom = do
|
||||
@@ -168,7 +161,7 @@ slowDoorRoom = do
|
||||
let crits = zipWith (\p r -> sPS p r randC1) ps rs
|
||||
barrels = zipWith (\x' y' -> sPS (V2 x' y') 0 $ PutCrit explosiveBarrel) xs' ys'
|
||||
proom <- southPillarsRoom x y h
|
||||
addButtonSlowDoor x h (proom & rmPmnts %~ (++ (crits ++ barrels)))
|
||||
addButtonSlowDoor x h (proom & rmPmnts <>~ (crits <> barrels))
|
||||
|
||||
slowDoorRoomRunPast :: RandomGen g => State g (MetaTree Room String)
|
||||
slowDoorRoomRunPast = do
|
||||
|
||||
Reference in New Issue
Block a user