Work on airlocks
This commit is contained in:
+3
-3
@@ -97,7 +97,7 @@ doInPlacements (im, w) =
|
||||
doRoomInPlacements :: IM.IntMap [Placement] -> GenWorld -> Room -> (GenWorld, Room)
|
||||
doRoomInPlacements im w rm = foldr f (w, rm) $ _rmInPmnt rm
|
||||
where
|
||||
f (InPlacement plf i) (w', r') = fst $ placeSpot (w', r') (plf $ im IM.! i)
|
||||
f (InPlacement plf i) (w', r') = fst $ placeSpot (w', r') (plf (w' ^. gwWorld) $ im IM.! i)
|
||||
|
||||
doOutPlacements :: GenWorld -> (IM.IntMap [Placement], GenWorld)
|
||||
doOutPlacements w =
|
||||
@@ -108,9 +108,9 @@ doRoomOutPlacements ::
|
||||
(IM.IntMap [Placement], GenWorld) ->
|
||||
Room ->
|
||||
((IM.IntMap [Placement], GenWorld), Room)
|
||||
doRoomOutPlacements imw r = foldr f (imw, r) $ _rmOutPmnt r
|
||||
doRoomOutPlacements imw r = foldr f (imw, r) $ IM.toList $ _rmOutPmnt r
|
||||
where
|
||||
f (OutPlacement pl i) ((im, w), rm) =
|
||||
f (i, pl) ((im, w), rm) =
|
||||
let ((neww, newrm), plmnts) = placeSpot (w, rm) pl
|
||||
in ((IM.insert i plmnts im, neww), newrm)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user