Cleanup
This commit is contained in:
@@ -24,12 +24,12 @@ roomsContaining crs its = tToBTree str <$> roomsContaining' crs its
|
|||||||
roomsContaining' :: RandomGen g => [Creature] -> [Item] -> State g (Tree Room)
|
roomsContaining' :: RandomGen g => [Creature] -> [Item] -> State g (Tree Room)
|
||||||
roomsContaining' crs its = do
|
roomsContaining' crs its = do
|
||||||
endroom <- join $ takeOne
|
endroom <- join $ takeOne
|
||||||
[ roomPillarsSquare <&> rmPmnts .++~ crsItmsUnused crs its
|
[ roomPillarsSquare <&> rmPmnts ++.~ crsItmsUnused crs its
|
||||||
, randomFourCornerRoomCrsIts crs its
|
, randomFourCornerRoomCrsIts crs its
|
||||||
, tanksRoom crs its
|
, tanksRoom crs its
|
||||||
, tanksPipesRoom <&> rmPmnts ++.~ crsItmsUnused crs its
|
, tanksPipesRoom <&> rmPmnts ++.~ crsItmsUnused crs its
|
||||||
, roomPillarsContaining crs its
|
, roomPillarsContaining crs its
|
||||||
, roomPillarsPassage <&> rmPmnts .++~ crsItmsUnused crs its
|
, roomPillarsPassage <&> rmPmnts ++.~ crsItmsUnused crs its
|
||||||
]
|
]
|
||||||
return (pure $ cleatOnward endroom)
|
return (pure $ cleatOnward endroom)
|
||||||
|
|
||||||
|
|||||||
+4
-12
@@ -15,7 +15,6 @@ import Dodge.Data
|
|||||||
import Dodge.PlacementSpot
|
import Dodge.PlacementSpot
|
||||||
import Dodge.RoomLink
|
import Dodge.RoomLink
|
||||||
import Dodge.Default.Room
|
import Dodge.Default.Room
|
||||||
import Dodge.Item.Weapon
|
|
||||||
import Dodge.Creature
|
import Dodge.Creature
|
||||||
import Dodge.Room.Pillar
|
import Dodge.Room.Pillar
|
||||||
import Dodge.Room.Girder
|
import Dodge.Room.Girder
|
||||||
@@ -24,6 +23,7 @@ import Dodge.LevelGen.Data
|
|||||||
import RandomHelp
|
import RandomHelp
|
||||||
import Dodge.Tree
|
import Dodge.Tree
|
||||||
import Dodge.Placement.Instance
|
import Dodge.Placement.Instance
|
||||||
|
import Dodge.Placement.Random
|
||||||
--import Dodge.LevelGen.Data
|
--import Dodge.LevelGen.Data
|
||||||
import Dodge.Room.Procedural
|
import Dodge.Room.Procedural
|
||||||
import Dodge.Room.Corridor
|
import Dodge.Room.Corridor
|
||||||
@@ -130,21 +130,13 @@ roomCenterPillar = do
|
|||||||
, mntLightLnkCond (resetPLUse $ rprBool $ \rp _ -> isOutLnk rp)
|
, mntLightLnkCond (resetPLUse $ rprBool $ \rp _ -> isOutLnk rp)
|
||||||
]
|
]
|
||||||
|
|
||||||
{- Probabilites of the type of the first floor weapon. -}
|
weaponEmptyRoom :: State StdGen (Tree Room)
|
||||||
randFirstWeapon :: State StdGen Item
|
|
||||||
randFirstWeapon = takeOne $
|
|
||||||
replicate 10 pistol
|
|
||||||
++ replicate 5 (bangStick 4)
|
|
||||||
++ replicate 5 (bangCaneX 3)
|
|
||||||
++ replicate 5 bangCone
|
|
||||||
++ [lasGun]
|
|
||||||
|
|
||||||
weaponEmptyRoom :: RandomGen g => State g (Tree Room)
|
|
||||||
weaponEmptyRoom = do
|
weaponEmptyRoom = do
|
||||||
w <- state $ randomR (220,300)
|
w <- state $ randomR (220,300)
|
||||||
h <- state $ randomR (220,300)
|
h <- state $ randomR (220,300)
|
||||||
|
wp <- randFirstWeapon
|
||||||
let plmnts =
|
let plmnts =
|
||||||
[sPS (V2 (w/2) (h-40)) 0 $ RandPS $ fmap PutFlIt randFirstWeapon
|
[sPS (V2 (w/2) (h-40)) 0 $ PutFlIt wp
|
||||||
,sPS (V2 20 20) (pi/2) randC1
|
,sPS (V2 20 20) (pi/2) randC1
|
||||||
,sPS (V2 (w-20) 20) (pi/2) randC1
|
,sPS (V2 (w-20) 20) (pi/2) randC1
|
||||||
,mntLightLnkCond useUnusedLnk
|
,mntLightLnkCond useUnusedLnk
|
||||||
|
|||||||
Reference in New Issue
Block a user