Broken commit (removed loadKeyConfig)

This commit is contained in:
2021-08-27 11:58:11 +01:00
parent c4df048d31
commit 3ff04576ab
25 changed files with 122 additions and 200 deletions
+1 -1
View File
@@ -13,5 +13,5 @@ linksOnPath r = all pointOnPath linkPoints
pathConnected :: Room -> Bool
pathConnected = isSingleton . pairsToSCC . _rmPath
where
isSingleton [] = True
isSingleton [_] = True
isSingleton _ = False
+8 -2
View File
@@ -1,14 +1,20 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
module Dodge.Room.Data
where
( Room (..)
, rmPolys
, rmLinks
, rmPath
, rmPS
, rmBound
, rmFloor
) where
import Dodge.LevelGen.Data
--import Geometry
import Geometry.Data
import Data.Tile
import Control.Lens
{-
The '_rmPolys' list states which polygons should be cut out to form the indestructible walls of the room.
Link pairs contain a position and rotation to attach to another room;
+1 -2
View File
@@ -33,8 +33,7 @@ randomiseAllLinks r = do
return $ r {_rmLinks = newLinks}
randomiseLinksBy
:: RandomGen g
=> ( [(Point2,Float)] -> State g [(Point2,Float)] )
:: ( [(Point2,Float)] -> State g [(Point2,Float)] )
-> Room
-> State g Room
randomiseLinksBy f r = do
+1 -2
View File
@@ -231,8 +231,7 @@ randomFourCornerRoom = do
{- | Creates room with a central vault with doors around it.
-}
centerVaultRoom
:: RandomGen g
=> Int -- ^ Door id
:: Int -- ^ Door id
-> Float -- ^ Width
-> Float -- ^ Height
-> Float -- ^ Vault dimensions
+1 -1
View File
@@ -51,7 +51,7 @@ litCorridor90 = do
, _rmBound = [poly]
}
noWeaponTest :: RandomGen g => State g (Tree (Either Room Room))
noWeaponTest :: State g (Tree (Either Room Room))
noWeaponTest = do
undefined
+2 -2
View File
@@ -14,7 +14,7 @@ import Geometry
--import Data.List
import Control.Monad.State
--import Control.Lens
import System.Random
--import System.Random
{- | A triangular room with loot at the top (with 'PutID' 2),
creatures in the bottom two corners (with 'PutID' 0),
and (single) entrance bottom middle. -}
@@ -50,7 +50,7 @@ triLootRoom w h = pure $ defaultRoom
]
base = rectNSWE 20 (-80) (-20) 20
{- | Create a random room with one entrance containing given creatures and items. -}
lootRoom :: RandomGen g => [Creature] -> [Item] -> State g Room
lootRoom :: [Creature] -> [Item] -> State g Room
lootRoom crs itms = do
let w = 300
h = 700