More strictifiiiying

This commit is contained in:
2021-07-30 01:25:11 +02:00
parent 2d8b27746c
commit 7b7fd302d8
37 changed files with 459 additions and 448 deletions
+32 -32
View File
@@ -23,16 +23,16 @@ airlockOneWay n = defaultRoom
{ _rmPolys = [rectNSWE 90 0 0 40]
, _rmLinks = lnks
, _rmPath = []
, _rmPS = [sPS (0,15) 0 $ PutDoubleDoor col (not . cond) (0,0) (0,40)
,sPS (0,75) 0 $ PutDoubleDoor col cond (0,0) (0,40)
,sPS (35,45) (pi/2) $ PutButton $ makeButton col (over worldState
, _rmPS = [sPS (V2 0 15) 0 $ PutDoubleDoor col (not . cond) (V2 0 0) (V2 0 40)
,sPS (V2 0 75) 0 $ PutDoubleDoor col cond (V2 0 0) (V2 0 40)
,sPS (V2 35 45) (pi/2) $ PutButton $ makeButton col (over worldState
(M.insert (DoorNumOpen n) True))
]
--, _rmBound = rectNSWE 90 30 (-30) 30
, _rmBound = [rectNSWE 75 15 0 40]
}
where lnks = [((0,85),0)
,((0, 5),pi)
where lnks = [((V2 0 85),0)
,((V2 0 5),pi)
]
cond w = or $ M.lookup (DoorNumOpen n) (_worldState w)
col = dim $ dim $ bright red
@@ -56,22 +56,22 @@ airlock0 n = defaultRoom
, rectNSWE 65 35 (-40) 20
]
, _rmLinks = lnks
, _rmPath = [((20,95),(20,45))
,((20,45),(20, 5))
, _rmPath = [((V2 20 95),(V2 20 45))
,((V2 20 45),(V2 20 5))
]
, _rmPS =
[sPS (0,20) 0 $ PutDoubleDoor col (not . cond) (1,0) (39,0)
,sPS (0,80) 0 $ PutDoubleDoor col cond (1,0) (39,0)
,sPS (35,50) (pi/2) $ PutButton $ makeSwitch col
[sPS (V2 0 20) 0 $ PutDoubleDoor col (not . cond) (V2 1 0) (V2 39 0)
,sPS (V2 0 80) 0 $ PutDoubleDoor col cond (V2 1 0) (V2 39 0)
,sPS (V2 35 50) (pi/2) $ PutButton $ makeSwitch col
(over worldState (M.insert (DoorNumOpen n) True))
(over worldState (M.insert (DoorNumOpen n) False))
,sPS (-25, 50) 0 putLamp
,sPS (V2 (-25) ( 50)) 0 putLamp
]
, _rmBound = [rectNSWE 75 15 0 40]
}
where
lnks = [((20,95),0)
,((20, 5),pi)
lnks = [((V2 20 95),0)
,((V2 20 5),pi)
]
cond w = or $ M.lookup (DoorNumOpen n) (_worldState w)
col = dim $ dim $ bright red
@@ -84,29 +84,29 @@ airlock90 n = defaultRoom
[ rectNSWE 100 10 10 100
, rectNSWE 20 0 20 60
, rectNSWE 20 60 20 0
, [ (10,100)
, map toV2 [ (10,100)
, (100,150)
, (150,100)
, (100,10)
]
]
, _rmLinks =
[((0,40),pi/2)
,((40, 0),pi)
[((V2 0 40),pi/2)
,((V2 40 0),pi)
]
, _rmPath =
[((0,40),(40,0))
,((40,0),(0,40))
[((V2 0 40),(V2 40 0))
,((V2 40 0),(V2 0 40))
]
, _rmPS =
[sPS (5,5) 0 $ PutDoor col (not . cond) pss
,sPS (120,120) (3* pi/4) $ PutButton $ makeSwitch col
[sPS (V2 5 5) 0 $ PutDoor col (not . cond) pss
,sPS (V2 120 120) (3* pi/4) $ PutButton $ makeSwitch col
(over worldState (M.insert (DoorNumOpen n) True))
(over worldState (M.insert (DoorNumOpen n) False))
,sPS (60, 60) 0 putLamp
,sPS (V2 60 60) 0 putLamp
]
, _rmBound =
[[ (10,10)
[map toV2 [ (10,10)
, (10,100)
, (100,150)
, (150,100)
@@ -116,7 +116,7 @@ airlock90 n = defaultRoom
where
cond w = or $ M.lookup (DoorNumOpen n) (_worldState w)
col = dim $ dim $ bright red
pss = ((0,0) ,) <$> arcStepwise 3 (negate $ pi/2) (0,0) (0,55)
pss = ((V2 0 0) ,) <$> arcStepwise 3 (negate $ pi/2) (V2 0 0) (V2 0 55)
airlockCrystal
:: Int -- ^ Door id
@@ -124,7 +124,7 @@ airlockCrystal
airlockCrystal n = defaultRoom
{ _rmPolys =
[ rectNSWE 140 0 0 40
, orderPolygon
, orderPolygon $ map toV2
[(39,20)
,(150,60)
,(150,80)
@@ -132,20 +132,20 @@ airlockCrystal n = defaultRoom
]
]
, _rmLinks =
[((20,130),0)
,((20, 0),pi)
[((V2 20 130),0)
,((V2 20 0),pi)
]
, _rmPath =
[
]
, _rmPS =
[sPS (0,0) 0 $ PutDoor col (not . cond) pss
,sPS (145,70) (pi/2) $ PutButton $ makeSwitch col
[sPS (V2 0 0) 0 $ PutDoor col (not . cond) pss
,sPS (V2 145 70) (pi/2) $ PutButton $ makeSwitch col
(over worldState (M.insert (DoorNumOpen n) True))
(over worldState (M.insert (DoorNumOpen n) False))
,crystalLine (0,70) (40,70)
,sPS (20, 40) 0 putLamp
,sPS (20, 100) 0 putLamp
,crystalLine (V2 0 70) (V2 40 70)
,sPS (V2 20 40) 0 putLamp
,sPS (V2 20 100) 0 putLamp
]
, _rmBound =
[ ]
@@ -154,5 +154,5 @@ airlockCrystal n = defaultRoom
cond w = or $ M.lookup (DoorNumOpen n) (_worldState w)
col = dim $ dim $ bright red
pss :: [(Point2,Point2)]
pss = reverse $ fmap ( (\x -> ((50,x),(50,x+50)) ) . fromIntegral)
pss = reverse $ fmap ( (\x -> ((V2 50 x),(V2 (50) (x+50))) ) . fromIntegral)
[20::Int,22..70]