Remove outplacements

This commit is contained in:
2025-09-23 17:14:30 +01:00
parent a6ca90d7d8
commit 60fdd138e3
4 changed files with 16 additions and 17 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ data Room = Room
, _rmPath :: S.Set (Point2, Point2)
, _rmPmnts :: [Placement]
, _rmInPmnt :: [GenWorld -> Placement]
, _rmOutPmnt :: IM.IntMap Placement
-- , _rmOutPmnt :: IM.IntMap Placement
, _rmBound :: [[Point2]]
, _rmFloor :: Floor
, _rmName :: String
+1 -1
View File
@@ -16,7 +16,7 @@ defaultRoom =
, _rmPath = mempty
, _rmPmnts = mempty
, _rmInPmnt = mempty
, _rmOutPmnt = mempty
-- , _rmOutPmnt = mempty
, _rmBound = mempty
, _rmFloor = InheritFloor
, _rmName = "defaultRoom"
+14 -14
View File
@@ -37,7 +37,7 @@ generateLevelFromRoomList gr' w =
. over gwWorld setupWorldBounds
-- . over (gwWorld . cWorld . lWorld) initItemLocations
. doInPlacements
. doOutPlacements
-- . doOutPlacements
. doIndividualPlacements
. setTiles
. worldToGenWorld rs'
@@ -88,20 +88,20 @@ doRoomInPlacements w rm = foldr f (w, rm) $ _rmInPmnt rm
where
f plf (w', r') = fst $ placeSpot (w', r') (plf (w'))
doOutPlacements :: GenWorld -> GenWorld
doOutPlacements w =
let ((pmnts, gw), rms) = mapAccumR doRoomOutPlacements (IM.empty, w) (_genRooms w)
in gw & genRooms .~ rms & genPmnt <>~ pmnts
--doOutPlacements :: GenWorld -> GenWorld
--doOutPlacements w =
-- let ((pmnts, gw), rms) = mapAccumR doRoomOutPlacements (IM.empty, w) (_genRooms w)
-- in gw & genRooms .~ rms & genPmnt <>~ pmnts
doRoomOutPlacements ::
(IM.IntMap [Placement], GenWorld) ->
Room ->
((IM.IntMap [Placement], GenWorld), Room)
doRoomOutPlacements imw r = foldr f (imw, r) $ IM.toList $ _rmOutPmnt r
where
f (i, pl) ((im, w), rm) =
let ((neww, newrm), plmnts) = placeSpot (w, rm) pl
in ((IM.insert i plmnts im, neww), newrm)
--doRoomOutPlacements ::
-- (IM.IntMap [Placement], GenWorld) ->
-- Room ->
-- ((IM.IntMap [Placement], GenWorld), Room)
--doRoomOutPlacements imw r = foldr f (imw, r) $ IM.toList $ _rmOutPmnt r
-- where
-- f (i, pl) ((im, w), rm) =
-- let ((neww, newrm), plmnts) = placeSpot (w, rm) pl
-- in ((IM.insert i plmnts im, neww), newrm)
doIndividualPlacements :: GenWorld -> GenWorld
doIndividualPlacements gw =
-1
View File
@@ -2,7 +2,6 @@ module Dodge.Room.RunPast (
lockedStart,
) where
import qualified Data.IntMap.Strict as IM
import Color
import qualified Data.Set as S
import Dodge.Cleat