Improve starting weapon rooms

This commit is contained in:
2021-11-24 22:13:42 +00:00
parent 2c759cb40e
commit 4ad02f29b2
4 changed files with 16 additions and 21 deletions
+4
View File
@@ -17,6 +17,7 @@ module Dodge.Room.Link
, changeLinkFrom
, randomiseOutLinks
, chooseOneInLink
, restrictRMInLinksPD
) where
import Dodge.Placement.PlaceSpot
import Dodge.LevelGen.Data
@@ -35,6 +36,9 @@ import qualified Data.Set as S
chooseOneInLink :: RandomGen g => Room -> State g Room
chooseOneInLink r = restrictToFstInLink <$> shuffleLinks r
restrictRMInLinksPD :: ((Point2,Float) -> Bool) -> Room -> Room
restrictRMInLinksPD f = rmLinks %~ restrictLinkType InLink f
restrictToFstInLink :: Room -> Room
restrictToFstInLink = rmLinks %~ f
where