Automatically inherit tile positioning

This commit is contained in:
2026-04-01 18:27:53 +01:00
parent e50fdb8807
commit 7a921b8967
5 changed files with 55 additions and 49 deletions
+4 -9
View File
@@ -37,18 +37,13 @@ doRoomShift rm = shiftRoomBy (_rmShift rm) rm & rmShift .~ _rmShift rm
shiftRoomBy :: (Point2, Float) -> Room -> Room
shiftRoomBy shift r =
r
& rmPolys %~ fmap (map (shiftPointBy shift))
& rmLinks %~ fmap (shiftLinkBy shift)
& rmPolys . each . each %~ shiftPointBy shift
& rmLinks . each %~ shiftLinkBy shift
& rmPath %~ S.map (shiftPathBy shift)
& rmBound %~ fmap (map (shiftPointBy shift))
& rmBound . each . each %~ shiftPointBy shift
& rmShift %~ shiftPosDirBy shift
& rmFloor . tiles . each %~ shiftTile shift
-- %~ map
-- ( (tilePoly %~ map (shiftPointBy shift))
-- . (tileZero %~ shiftPointBy shift)
-- . (tileTangentPos %~ shiftPointBy shift)
-- )
& rmViewpoints %~ map (shiftPointBy shift)
& rmViewpoints . each %~ shiftPointBy shift
shiftTile :: Point2A -> Tile -> Tile
shiftTile shift tl = case tl ^. tileZeroShift of
+4 -1
View File
@@ -430,12 +430,15 @@ loadAmmoTut = do
. analyserByDoor (RequireEquipment (AMMOMAG DRUMMAG)) i
=<< shuffleLinks
=<< join (takeOne [roomNgon 6 80, roomRectAutoLights 100 100])
-- =<< join (takeOne [roomNgon 6 80])
j <- nextLayoutInt
wprm <-
putSingleLight
. addDoorAtNthLinkToggleInterrupt 0 ["DOOR LOCKDOWN ACTIVE"] j
=<< shuffleLinks
=<< roomRectAutoLights 100 100
-- =<< roomRectAutoLights 100 100
=<< join (takeOne [roomNgon 6 80, roomRectAutoLights 100 100])
-- =<< join (takeOne [roomNgon 6 80])
droom <- distributerRoom BulletAmmo (10 ^ (4::Int))
ncrits <- takeOne [1,1,2,2,2,3]
croom <- roomCCrits ncrits