Make buttons have shape, expose multiple bugs
This commit is contained in:
@@ -62,7 +62,7 @@ airlock0 n = defaultRoom
|
||||
, _rmPS =
|
||||
[sPS (V2 0 20) 0 $ PutDoubleDoor col (not . cond) (V2 1 0) (V2 39 0) 2
|
||||
,sPS (V2 0 80) 0 $ PutDoubleDoor col cond (V2 1 0) (V2 39 0) 2
|
||||
,sPS (V2 35 50) (pi/2) $ PutButton $ makeSwitch col
|
||||
,sPS (V2 35 50) (pi/2) $ PutButton $ makeSwitch col red
|
||||
(over worldState (M.insert (DoorNumOpen n) True))
|
||||
(over worldState (M.insert (DoorNumOpen n) False))
|
||||
,sPS (V2 (-25) 50) 0 putLamp
|
||||
@@ -100,7 +100,7 @@ airlock90 n = defaultRoom
|
||||
]
|
||||
, _rmPS =
|
||||
[sPS (V2 5 5) 0 $ PutDoor col (not . cond) pss
|
||||
,sPS (V2 120 120) (3* pi/4) $ PutButton $ makeSwitch col
|
||||
,sPS (V2 120 120) (3* pi/4) $ PutButton $ makeSwitch col red
|
||||
(over worldState (M.insert (DoorNumOpen n) True))
|
||||
(over worldState (M.insert (DoorNumOpen n) False))
|
||||
,sPS (V2 60 60) 0 putLamp
|
||||
@@ -140,7 +140,7 @@ airlockCrystal n = defaultRoom
|
||||
]
|
||||
, _rmPS =
|
||||
[sPS (V2 0 0) 0 $ PutDoor col (not . cond) pss
|
||||
,sPS (V2 145 70) (pi/2) $ PutButton $ makeSwitch col
|
||||
,sPS (V2 145 70) (pi/2) $ PutButton $ makeSwitch col red
|
||||
(over worldState (M.insert (DoorNumOpen n) True))
|
||||
(over worldState (M.insert (DoorNumOpen n) False))
|
||||
,crystalLine (V2 0 70) (V2 40 70)
|
||||
|
||||
@@ -17,8 +17,8 @@ corridor = defaultRoom
|
||||
, _rmLinks = lnks
|
||||
, _rmPath = concatMap (doublePair . (,) (V2 20 60) . fst) lnks
|
||||
, _rmPS =
|
||||
[-- sPS (V2 20 40) 0 $ PutLS (lightAt (V3 0 0 50) 0) (lampPic 50)
|
||||
sPS (V2 0 0) 0 $ PutForeground $ highPipe 55 (V2 0 40) (V2 40 40)
|
||||
[sPS (V2 20 40) 0 $ PutLS (lightAt (V3 0 0 50) 0) (lampPic 50)
|
||||
,sPS (V2 0 0) 0 $ PutForeground $ highPipe 55 (V2 0 40) (V2 40 40)
|
||||
]
|
||||
, _rmBound = [ rectNSWE 50 30 0 40 ]
|
||||
, _rmFloor = [makeTileFromPoly poly 2]
|
||||
|
||||
@@ -15,6 +15,7 @@ import Dodge.LevelGen.Switch
|
||||
import Dodge.RandomHelp
|
||||
import Dodge.Creature.Inanimate
|
||||
import Dodge.Creature
|
||||
import Dodge.LightSources
|
||||
import Picture
|
||||
import Geometry
|
||||
|
||||
@@ -44,14 +45,17 @@ twinSlowDoorRoom drID w h x = defaultRoom
|
||||
, sPS (V2 (negate 25) 5) 0 putLamp
|
||||
, sPS (V2 0 0) 0 $ PutSingleDoor col cond (V2 x 1) (V2 x h) 1
|
||||
, sPS (V2 0 0) 0 $ PutSingleDoor col cond (V2 (-x) 1) (V2 (-x) h) 1
|
||||
, sPS (V2 0 (h-5)) pi $ PutButton $ makeSwitch col
|
||||
, sPS (V2 0 (h-5)) pi $ PutButton $ makeSwitch col red
|
||||
(over worldState (M.insert (DoorNumOpen drID) True))
|
||||
(over worldState (M.insert (DoorNumOpen drID) False))
|
||||
-- , sPS (V2 0 (h-1)) 0 $ PutLS (colorLightAt (V3 0.75 0 0) (V3 0 0 lampHeight) 0) (lampPic lampHeight)
|
||||
-- , sPS (V2 0 (h-1)) 0 $ PutProp $ lampCover lampHeight
|
||||
]
|
||||
, _rmBound = ps
|
||||
, _rmName = "twinSlowDoorRoom"
|
||||
}
|
||||
where
|
||||
lampHeight = 41
|
||||
ps =
|
||||
[rectNSWE h 0 (-w) w
|
||||
,rectNSWE 20 (-h) (negate x) x
|
||||
|
||||
@@ -246,7 +246,7 @@ centerVaultRoom n w h d = do
|
||||
col = dim $ dim $ bright red
|
||||
theDoor i =
|
||||
[ sPS (V2 0 (d-10)) 0 $ PutDoubleDoor col (cond i) (V2 (-19) 0) (V2 19 0) 2
|
||||
, sPS (V2 35 (d+4)) 0 $ PutButton $ makeSwitch col
|
||||
, sPS (V2 35 (d+4)) 0 $ PutButton $ makeSwitch col red
|
||||
(over worldState (M.insert (DoorNumOpen i) True))
|
||||
(over worldState (M.insert (DoorNumOpen i) False))
|
||||
]
|
||||
|
||||
@@ -8,7 +8,7 @@ import Dodge.Room.Placement
|
||||
import Dodge.Room.Foreground
|
||||
import Dodge.Layout.Tree.Polymorphic
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LightSources
|
||||
--import Dodge.LightSources
|
||||
--import Picture
|
||||
import Geometry.Data
|
||||
|
||||
@@ -33,13 +33,10 @@ startRoom = do
|
||||
<$> randomiseOutLinks (shiftRoomBy (V2 (-20) (-20),0)
|
||||
$ roomRectAutoLinks w h & rmPS .~
|
||||
[ fground
|
||||
--, theLamp
|
||||
, sPS (V2 100 100) 0 $ PutLS (colorLightAt (V3 0.75 0 0) (V3 0 0 lampHeight) 0) (lampPic lampHeight)
|
||||
, sPS (V2 100 100) 0 $ PutProp $ lampCover lampHeight
|
||||
, theLamp
|
||||
--, sPS (V2 100 100) 0 $ PutLS (colorLightAt (V3 0.75 0 0) (V3 0 0 lampHeight) 0) (lampPic lampHeight)
|
||||
--, sPS (V2 100 100) 0 $ PutProp $ lampCover lampHeight
|
||||
]
|
||||
)
|
||||
where
|
||||
lampHeight = 41
|
||||
-- where
|
||||
-- cola = dark . dark . light . light $ light red
|
||||
-- colb = dark . dark . light . light $ light blue
|
||||
--lampHeight = 41
|
||||
|
||||
Reference in New Issue
Block a user