Fix placement shifting
This commit is contained in:
+10
-10
@@ -71,16 +71,16 @@ initialRoomTree = do
|
|||||||
---- ,[Corridor]
|
---- ,[Corridor]
|
||||||
---- ,[Corridor]
|
---- ,[Corridor]
|
||||||
-- --,[SpecificRoom $ pure . Right <$> twinSlowDoorChasers]
|
-- --,[SpecificRoom $ pure . Right <$> twinSlowDoorChasers]
|
||||||
,[SpecificRoom $ pure $ (pure . Right) (twinSlowDoorRoom 80 200 40)]
|
--- ,[SpecificRoom $ pure $ (pure . Right) (twinSlowDoorRoom 80 200 40)]
|
||||||
,[Corridor]
|
--- ,[Corridor]
|
||||||
,[DoorAno]
|
--- ,[DoorAno]
|
||||||
,[SpecificRoom $ pure . Right <$> centerVaultExplosiveExit]
|
--- ,[SpecificRoom $ pure . Right <$> centerVaultExplosiveExit]
|
||||||
,[SpecificRoom blockedCorridor]
|
--- ,[SpecificRoom blockedCorridor]
|
||||||
,[OrAno [[DoorAno]
|
--- ,[OrAno [[DoorAno]
|
||||||
,[Corridor]
|
--- ,[Corridor]
|
||||||
,[DoorNumAno 0,AirlockAno]]
|
--- ,[DoorNumAno 0,AirlockAno]]
|
||||||
]
|
--- ]
|
||||||
,[FirstWeapon]
|
--- ,[FirstWeapon]
|
||||||
,[CorridorDebug]
|
,[CorridorDebug]
|
||||||
,[SpecificRoom $ fmap (pure . Right) randomFourCornerRoom]
|
,[SpecificRoom $ fmap (pure . Right) randomFourCornerRoom]
|
||||||
,[Corridor]
|
,[Corridor]
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ placeSpot' w (shift, plmnt) =
|
|||||||
let (i,w') = placeSpotID (shiftPSBy' shift (_placementSpot plmnt)) w
|
let (i,w') = placeSpotID (shiftPSBy' shift (_placementSpot plmnt)) w
|
||||||
in maybe w' (curry (placeSpot' w') shift) (_idPlacement plmnt i)
|
in maybe w' (curry (placeSpot' w') shift) (_idPlacement plmnt i)
|
||||||
|
|
||||||
|
shiftPlacement :: (Point2,Float) -> Placement -> Placement
|
||||||
|
shiftPlacement shift (Placement ps f) = Placement (shiftPSBy' shift ps)
|
||||||
|
(fmap (fmap $ shiftPlacement shift) f)
|
||||||
|
|
||||||
shiftPSBy'
|
shiftPSBy'
|
||||||
:: (Point2,Float)
|
:: (Point2,Float)
|
||||||
-> PlacementSpot
|
-> PlacementSpot
|
||||||
|
|||||||
@@ -87,9 +87,11 @@ combineRooms r r' = defaultRoom
|
|||||||
{ _rmPolys = _rmPolys r ++ _rmPolys r'
|
{ _rmPolys = _rmPolys r ++ _rmPolys r'
|
||||||
, _rmLinks = _rmLinks r ++ _rmLinks r'
|
, _rmLinks = _rmLinks r ++ _rmLinks r'
|
||||||
, _rmPath = _rmPath r ++ _rmPath r'
|
, _rmPath = _rmPath r ++ _rmPath r'
|
||||||
, _rmPS = _rmPS r ++ _rmPS r'
|
, _rmPS = map (shiftPlacement $ _rmShift r) (_rmPS r)
|
||||||
|
++ map (shiftPlacement $ _rmShift r') (_rmPS r')
|
||||||
, _rmBound = _rmBound r ++ _rmBound r'
|
, _rmBound = _rmBound r ++ _rmBound r'
|
||||||
, _rmFloor = _rmFloor r ++ _rmFloor r'
|
, _rmFloor = _rmFloor r ++ _rmFloor r'
|
||||||
|
, _rmShift = (V2 0 0 , 0)
|
||||||
}
|
}
|
||||||
--{- The top fourth of a room of a given height. -}
|
--{- The top fourth of a room of a given height. -}
|
||||||
--fourth
|
--fourth
|
||||||
|
|||||||
Reference in New Issue
Block a user