Unify RoomPos constructors

This commit is contained in:
2022-03-10 18:40:22 +00:00
parent 7b1ac2b682
commit 01c58490fa
8 changed files with 135 additions and 127 deletions
+1 -3
View File
@@ -132,9 +132,7 @@ addButtonSlowDoor x h rm = do
$ Nothing
getdoorpos drid w = let Just (a,b) = w ^? doors . ix drid . drPos
in (b, argV (a-.-b))
butPosCond (UnusedLink (V2 x' y') a' _ rpls) _ | y' < 0.5 * h
= Just (PS (V2 x' y') a' , UsedSpot (V2 x' y') a' (S.singleton RoomPosExLink) rpls)
butPosCond _ _ = Nothing
butPosCond = useRoomPosCond $ \rp -> isUnusedLnk rp && yV2 (_rpPos rp) < 0.5 * h
--butPosCond _ = True -- y < h
col = dim $ light red
cond' btid w = w ^? buttons . ix btid . btState /= Just BtOff