Slightly broken placements

This commit is contained in:
2021-11-14 19:56:22 +00:00
parent affdde0f21
commit 2a28967cd3
9 changed files with 166 additions and 114 deletions
+3 -3
View File
@@ -114,10 +114,10 @@ addButtonSlowDoor x h rm = do
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 _ _ = putLitButtonID' col butPosCond
--butDoor bpos brot = putLitButtonID col bpos brot
butDoor _ _ = putLitButOnPos col butPosCond
$ \btid -> Just $ putDoubleDoor False col (cond' btid) (V2 0 h) (V2 x h) 2
butPosCond (V2 _ y,_) = y < h
butPosCond (UnusedLink (V2 x' y') a') | y' < 0.5 * h = Just $ PS (V2 x' y') a'
butPosCond _ = Nothing
--butPosCond _ = True -- y < h
col = dim $ light red
cond' btid w = w ^? buttons . ix btid . btState /= Just BtOff