Combine Door and AutoDoor type constructors, add doorPathable field
This commit is contained in:
@@ -26,13 +26,6 @@ autoDoorAt a b wls = IM.union wls $ IM.fromList $ zip is $ mkAutoDoor a b is
|
||||
mkAutoDoor :: Point2 -> Point2 -> [Int] -> [Wall]
|
||||
mkAutoDoor pl pr xs = addSound $ zipWith3 (autoDoorPane [pl,pr])
|
||||
xs
|
||||
-- [ True
|
||||
-- , False
|
||||
-- , True
|
||||
-- , True
|
||||
-- , False
|
||||
-- , True
|
||||
-- ]
|
||||
[ [pld,hwd,hw,pl]
|
||||
, [hwd,hwu]
|
||||
, [hwu,plu,pl,hw]
|
||||
@@ -69,7 +62,7 @@ mkAutoDoor pl pr xs = addSound $ zipWith3 (autoDoorPane [pl,pr])
|
||||
where wp = (_wlLine $ _walls w IM.! (head xs)) !! 1
|
||||
|
||||
autoDoorPane :: [Point2] -> Int -> [Point2] -> [Point2] -> Wall
|
||||
autoDoorPane trigL n closedPos openPos = AutoDoor
|
||||
autoDoorPane trigL n closedPos openPos = Door
|
||||
{ _wlLine = closedPos
|
||||
, _wlID = n
|
||||
, _doorMech = dm
|
||||
@@ -77,6 +70,7 @@ autoDoorPane trigL n closedPos openPos = AutoDoor
|
||||
, _wlDraw = Nothing
|
||||
, _wlSeen = False
|
||||
, _wlIsSeeThrough = False
|
||||
, _doorPathable = True
|
||||
}
|
||||
where
|
||||
a = closedPos !! 0
|
||||
|
||||
@@ -116,7 +116,7 @@ triggerDoorPane c cond n closedPos openPos = Door
|
||||
, _wlDraw = Nothing
|
||||
, _wlSeen = False
|
||||
, _wlIsSeeThrough = False
|
||||
-- , _doorLine = [a,b,a',b']
|
||||
, _doorPathable = False
|
||||
}
|
||||
where
|
||||
a = closedPos !! 0
|
||||
|
||||
Reference in New Issue
Block a user