Cleanup
This commit is contained in:
@@ -16,8 +16,8 @@ import Picture
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
{- | A passage with a switch that opens forward access while closing backwards access. -}
|
||||
airlock :: RandomGen g => State g Room
|
||||
--airlock = takeOne [airlock0,airlock90,airlockCrystal,airlockZ]
|
||||
airlock = takeOne [airlockCrystal]
|
||||
airlock = takeOne [airlock0,airlock90,airlockCrystal,airlockZ]
|
||||
--airlock = takeOne [airlockCrystal]
|
||||
{- | Straight airlock -}
|
||||
airlock0 :: Room
|
||||
airlock0 = defaultRoom
|
||||
@@ -129,13 +129,9 @@ airlock90 = defaultRoom
|
||||
col = dim $ dim $ bright red
|
||||
pss = (V2 0 0 ,) <$> arcStepwise 3 (negate $ pi/2) (V2 0 0) (V2 0 55)
|
||||
|
||||
airlockCrystal
|
||||
:: Room
|
||||
airlockCrystal :: Room
|
||||
airlockCrystal = defaultRoom
|
||||
{ _rmPolys =
|
||||
[ rectNSWE 140 0 0 40
|
||||
, orderPolygon $ map toV2 [ (39,20) , (150,60) , (150,80) , (39,120) ]
|
||||
]
|
||||
{ _rmPolys = [ rectNSWE 140 0 0 40 , switchcutout ]
|
||||
, _rmLinks = muout[(V2 20 130,0) ] ++ muin[(V2 20 0 ,pi) ]
|
||||
, _rmPath = [ ]
|
||||
, _rmPmnts =
|
||||
@@ -144,13 +140,10 @@ airlockCrystal = defaultRoom
|
||||
, crystalLine (V2 0 70) (V2 40 70)
|
||||
, mntLS vShape (V2 150 70) (V3 110 70 70)
|
||||
]
|
||||
, _rmBound =
|
||||
[ rectNSWE 120 20 0 40
|
||||
, orderPolygon $ map toV2 [ (39,20) , (150,60) , (150,80) , (39,120) ]
|
||||
]
|
||||
, _rmBound = [ rectNSWE 120 20 0 40 , switchcutout ]
|
||||
}
|
||||
where
|
||||
--cond w = or $ M.lookup (DoorNumOpen n) (_worldState w)
|
||||
switchcutout = orderPolygon $ map toV2 [ (39,20) , (150,60) , (150,80) , (39,120) ]
|
||||
cond btid w' = _btState (_buttons w' IM.! btid) == BtOn
|
||||
col = dim $ dim $ bright red
|
||||
pss :: [(Point2,Point2)]
|
||||
|
||||
@@ -334,7 +334,9 @@ spawnerRoom :: RandomGen g => State g (Tree Room)
|
||||
spawnerRoom = do
|
||||
x <- state $ randomR (250,300)
|
||||
y <- state $ randomR (300,400)
|
||||
roomWithSpawner <- roomC x y <&>
|
||||
rmPmnts .:~ spNoID (PSRoomRand 0 (uncurry PS)) (PutCrit spawnerCrit)
|
||||
roomWithSpawner <- roomC x y <&> rmPmnts .:~ spNoID
|
||||
(rprBool $ \rp _ -> _rpPlacementUse rp == 0 && RoomPosOnPath `S.member` _rpType rp
|
||||
&& xV2 (_rpPos rp) < x/2 && yV2 (_rpPos rp) < y/2 )
|
||||
(PutCrit spawnerCrit)
|
||||
aRoom <- airlock
|
||||
return $ treeFromTrunk [ aRoom, corridor] $ pure $ cleatOnward roomWithSpawner
|
||||
|
||||
Reference in New Issue
Block a user