Assign used links during room generation
This commit is contained in:
@@ -106,8 +106,12 @@ addButtonSlowDoor x h rm = do
|
||||
,( V2 (x/2+50) 5,0)
|
||||
]
|
||||
thePlacement <- takeOne [butDoor butPos butRot ]
|
||||
filterLinks aboveH =<< changeLinkTo belowH (rm & rmPS %~ (thePlacement :))
|
||||
filterLinks aboveH =<< changeLinkTo belowH (rm
|
||||
& rmPS %~ (thePlacement :)
|
||||
& rmBound %~ (openDoorBound :)
|
||||
)
|
||||
where
|
||||
openDoorBound = rectNSEW (h + 5) (h - 5) (-x/2) (3*x/2)
|
||||
belowH y = (sndV2 . fst) y < h - 40
|
||||
aboveH y = (sndV2 . fst) y > h + 40
|
||||
butDoor bpos brot = putLitButtonID col bpos brot
|
||||
|
||||
Reference in New Issue
Block a user