Transition to new room datatypes, first separate out/inlinks

This commit is contained in:
2021-11-23 17:27:33 +00:00
parent 67b0d694af
commit 0f4040807a
19 changed files with 119 additions and 87 deletions
+10 -11
View File
@@ -23,7 +23,8 @@ airlock = takeOne [airlock0,airlock90,airlockCrystal,airlockZ]
airlock0 :: Room
airlock0 = defaultRoom
{ _rmPolys = [ rectNSWE 100 0 0 40 , rectNSWE 65 35 (-40) 20 ]
, _rmLinks = lnks
, _rmOutLinks = init lnks
, _rmInLinks = [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)
@@ -45,7 +46,8 @@ airlockSimple :: Room
airlockSimple = defaultRoom
{ _rmPolys =
[ rectNSWE 120 0 0 180 ]
, _rmLinks = lnks
, _rmOutLinks = init lnks
, _rmInLinks = [last lnks]
, _rmPath = concatMap (doublePair. (V2 90 30,) . fst) lnks
, _rmPmnts =
[pContID (PS (V2 90 115) pi) (PutButton $ makeSwitch col red id id)
@@ -68,10 +70,8 @@ airlockZ :: Room
airlockZ = defaultRoom
{ _rmPolys =
[ rectNSWE 120 0 0 180 ]
, _rmLinks =
[(V2 0 30,pi/2)
,(V2 180 30,1.5*pi)
]
, _rmOutLinks = [(V2 0 30,pi/2)]
, _rmInLinks = [(V2 180 30,1.5*pi) ]
, _rmPath = []
-- [(V2 0 40,V2 40 0)
-- ,(V2 40 0,V2 0 40)
@@ -108,10 +108,8 @@ airlock90 = defaultRoom
, (100,10)
]
]
, _rmLinks =
[(V2 0 40,pi/2)
,(V2 40 0,pi)
]
, _rmOutLinks = [(V2 0 40,pi/2)]
, _rmInLinks = [(V2 40 0,pi) ]
, _rmPath =
[(V2 0 40,V2 40 0)
,(V2 40 0,V2 0 40)
@@ -143,7 +141,8 @@ airlockCrystal = defaultRoom
[ rectNSWE 140 0 0 40
, orderPolygon $ map toV2 [ (39,20) , (150,60) , (150,80) , (39,120) ]
]
, _rmLinks = [(V2 20 130,0) ,(V2 20 0 ,pi) ]
, _rmOutLinks = [(V2 20 130,0) ]
, _rmInLinks = [(V2 20 0 ,pi) ]
, _rmPath = [ ]
, _rmPmnts =
[pContID (PS (V2 145 70) (pi/2)) ( PutButton $ makeSwitch col red id id)