Fix one bug in door wall movement, add airlock, cleanup
This commit is contained in:
@@ -8,6 +8,7 @@ import Dodge.Data
|
||||
--import Dodge.Base
|
||||
--import Dodge.Zone
|
||||
import Dodge.Default.Wall
|
||||
import Dodge.Wall.Move
|
||||
--import Dodge.LevelGen.Switch
|
||||
--import Dodge.LevelGen.Pathing
|
||||
import Dodge.LevelGen.MoveDoor
|
||||
@@ -69,13 +70,14 @@ doorMechanismStepwise nsteps drid wlids pss dr w
|
||||
where
|
||||
playSound = soundContinue (WallSound drid) (fst $ head pss) slideDoorS (Just 1)
|
||||
toOpen = _drTrigger dr w
|
||||
cpss = uncurry (rectanglePairs 9) (head pss)
|
||||
setWalls n = playSound (foldl' setWall w (zip3 wlids newps cpss))
|
||||
--cpss = uncurry (rectanglePairs 9) (head pss)
|
||||
setWalls n = playSound (foldl' setWall w (zip wlids newps))
|
||||
& doors . ix drid . drStatus .~ DoorInt n
|
||||
where
|
||||
newps = uncurry (rectanglePairs 9) (pss !! n)
|
||||
setWall w' (wlid,ps,cps) = w' & walls . ix wlid . wlLine .~ ps
|
||||
& (\w'' -> foldr (changeZonedWall (wlLine .~ ps) wlid) w'' (zoneps cps))
|
||||
setWall w' (wlid,ps) = w' & moveWallID wlid ps
|
||||
-- setWall w' (wlid,ps,cps) = w' & walls . ix wlid . wlLine .~ ps
|
||||
-- & (\w'' -> foldr (changeZonedWall (wlLine .~ ps) wlid) w'' (zoneps cps))
|
||||
-- it is not at all clear that the zoning selects the correct walls
|
||||
|
||||
-- TODO think about wall zoning, simplify!
|
||||
|
||||
Reference in New Issue
Block a user