Combine Door and AutoDoor type constructors, add doorPathable field

This commit is contained in:
jgk
2021-03-21 13:33:57 +01:00
parent 8108772894
commit a34c578786
6 changed files with 8 additions and 22 deletions
+2 -8
View File
@@ -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
+1 -1
View File
@@ -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