Cleanup
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
{- Specification of rooms that teleport (between levels). -}
|
||||
module Dodge.Room.Teleport where
|
||||
|
||||
import Control.Lens
|
||||
import Control.Monad.State
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.Room.Procedural
|
||||
import Geometry
|
||||
import Picture
|
||||
import System.Random
|
||||
|
||||
telRoomLev ::
|
||||
RandomGen g =>
|
||||
-- | Level number to teleport to
|
||||
Int ->
|
||||
State g Room
|
||||
telRoomLev _ = do
|
||||
w <- state $ randomR (200, 300)
|
||||
h <- state $ randomR (200, 300)
|
||||
roomRectAutoLinks w h <&> rmPmnts
|
||||
.~ [ sPS (V2 (w / 2) (h / 2)) 0 $ PutPPlate telPP
|
||||
, sPS (V2 (w / 2) (h / 2 + 30)) 0 putLamp
|
||||
]
|
||||
where
|
||||
telPP =
|
||||
PressPlate
|
||||
{ _ppPict = setDepth 0.5 . color red $ polygon ppFootprint
|
||||
, _ppPos = V2 0 0
|
||||
, _ppRot = 0
|
||||
, _ppEvent = PPLevelReset
|
||||
, _ppID = 0
|
||||
, _ppText = "NEW LEVEL"
|
||||
}
|
||||
ppFootprint = reverse $ rectNSWE 20 (-20) (-20) 20
|
||||
Reference in New Issue
Block a user