Unify RoomPos constructors
This commit is contained in:
@@ -24,7 +24,7 @@ import Tile
|
||||
import MonadHelp
|
||||
import LensHelp
|
||||
|
||||
import qualified Data.Set as S
|
||||
--import qualified Data.Set as S
|
||||
import Control.Monad.State
|
||||
--import Control.Monad.Loops
|
||||
import System.Random
|
||||
@@ -83,13 +83,8 @@ glassSwitchBack = do
|
||||
hgt <- state $ randomR (400,600)
|
||||
wllen <- state $ randomR (60,wth/2-40)
|
||||
let hf = hgt/5
|
||||
con1 cond (UnusedLink (V2 x y) a _ rpls) _
|
||||
| cond y = Just (PS (V2 x y) a , UsedSpot (V2 x y) a (S.singleton RoomPosExLink) rpls)
|
||||
con1 _ _ _ = Nothing
|
||||
plmnts =
|
||||
[ mntLightLnkCond $ con1 (< 0.5 * hgt)
|
||||
, mntLightLnkCond $ con1 (> 0.5 * hgt)
|
||||
,windowLine (V2 (wth-60 ) hf ) (V2 wllen hf )
|
||||
[ windowLine (V2 (wth-60 ) hf ) (V2 wllen hf )
|
||||
,windowLine (V2 (wth-wllen) (2*hf)) (V2 60 (2*hf))
|
||||
,windowLine (V2 (wth-60 ) (3*hf)) (V2 wllen (3*hf))
|
||||
,windowLine (V2 (wth-wllen) (4*hf)) (V2 60 (4*hf))
|
||||
|
||||
Reference in New Issue
Block a user