From 0434968b739dbc30d0a23f26250a69d459122f55 Mon Sep 17 00:00:00 2001 From: justin Date: Tue, 14 Jun 2022 16:17:09 +0100 Subject: [PATCH] Stop door z fighting --- src/Dodge/Room/Airlock.hs | 9 +++++---- src/Dodge/Room/RezBox.hs | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Dodge/Room/Airlock.hs b/src/Dodge/Room/Airlock.hs index 3ad13c812..3d483c16a 100644 --- a/src/Dodge/Room/Airlock.hs +++ b/src/Dodge/Room/Airlock.hs @@ -21,19 +21,20 @@ airlock = takeOne [airlock0,airlock90,airlockCrystal,airlockZ] {- | Straight airlock -} airlock0 :: Room airlock0 = defaultRoom - { _rmPolys = [ rectNSWE 100 0 0 40 , rectNSWE 65 35 (-40) 20 ] + { _rmPolys = [ rectNSWE 100 0 0 40 , switchcut] , _rmLinks = muout lnks ++ muin [last lnks] , _rmPath = [(V2 20 95,V2 20 45) ,(V2 20 45,V2 20 5) ] , _rmPmnts = [pContID (PS (V2 (-35) 50) (negate $ pi/2)) (PutButton $ makeSwitch col red id id) - $ \btid -> Just $ putDoubleDoorThen False col (not . cond' btid) 1 (V2 (-1) 20) (V2 41 20) 2 - $ \_ _ -> Just $ putDoubleDoor False col (cond' btid) (V2 (-1) 80) (V2 41 80) 2 + $ \btid -> Just $ putDoubleDoorThen False col (not . cond' btid) 1 (V2 0 20) (V2 40 20) 2 + $ \_ _ -> Just $ putDoubleDoor False col (cond' btid) (V2 0 80) (V2 40 80) 2 ,spanLightI (V2 (-2) 30) (V2 (-2) 70) ,sps0 $ PutShape $ thinHighBar 75 (V2 40 50) (V2 (-1) 50) ] - , _rmBound = [rectNSWE 75 15 0 40] + , _rmBound = [rectNSWE 75 15 0 40,switchcut] } where + switchcut = rectNSWE 65 35 (-40) 20 lnks = [(V2 20 95,0) ,(V2 20 5,pi) ] diff --git a/src/Dodge/Room/RezBox.hs b/src/Dodge/Room/RezBox.hs index 74ab6d847..b39718a48 100644 --- a/src/Dodge/Room/RezBox.hs +++ b/src/Dodge/Room/RezBox.hs @@ -115,7 +115,7 @@ rezBoxes = do centralRoom <- shuffleLinks $ (roomRectAutoLinks w h) {_rmPmnts = []} & rmLinks %~ setInLinks bottomEdgeTest let n = length $ filter bottomEdgeTest $_rmLinks centralRoom - return $ tToBTree "rezBoxes" $ treeFromTrunk [rezBox thecol, door] + return $ tToBTree "rezBoxes" $treeFromTrunk [rezBox thecol, door] $ Node centralRoom (replicate (n-1) dbox ++ [Node (cleatOnward door) []]) rezColor :: RandomGen g => State g LightSource