Work on rectangular sensor room
This commit is contained in:
@@ -27,8 +27,8 @@ import RandomHelp
|
||||
-- for roomRectAutoLinks-- make the locked door a center door?
|
||||
sensorRoom :: SensorType -> Int -> State LayoutVars (Tree Room)
|
||||
sensorRoom senseType n = do
|
||||
rm <- join $ takeOne [addLightsNGon =<< roomNgon 8 200, roomRectAutoLights 200 200]
|
||||
--rm <- join $ takeOne [addLightsNGon =<< roomNgon 8 200]
|
||||
--rm <- join $ takeOne [addLightsNGon =<< roomNgon 8 200, roomRectAutoLights 200 200]
|
||||
rm <- join $ takeOne [ roomRectAutoLights 200 200]
|
||||
cenroom <- shuffleLinks $ sensInsideDoor senseType n rm
|
||||
return $
|
||||
treePost
|
||||
@@ -70,8 +70,7 @@ sensAboveDoor sensetype wth ps =
|
||||
sensInsideDoor :: SensorType -> Int -> Room -> Room
|
||||
sensInsideDoor senseType i rm =
|
||||
rm
|
||||
& rmName
|
||||
.++~ take 4 (show senseType)
|
||||
& rmName .++~ take 4 (show senseType)
|
||||
& rmPmnts
|
||||
.++~ [ psPt atFstLnkOut . PutForeground $ floorWire (V2 20 0) (V2 20 (-100))
|
||||
, psPt atFstLnkOut . PutForeground $ floorWire (V2 0 (-100)) (V2 20 (-100))
|
||||
@@ -79,8 +78,16 @@ sensInsideDoor senseType i rm =
|
||||
, putMessageTerminal
|
||||
(textTerminal & tmCommands .:~ TCDamageCommand)
|
||||
& plSpot
|
||||
.~ rprBoolShift isUnusedLnk (shiftInBy 10 <&> (,S.singleton UsedPosHigh))
|
||||
.~ rprBoolShift termpos (shiftInBy 10 <&> (,S.singleton UsedPosHigh))
|
||||
, sensAboveDoor senseType 10 (atFstLnkOutShiftInward 100) & plExternalID ?~ i
|
||||
]
|
||||
where
|
||||
termpos rp rm' = isUnusedLnk rp rm'
|
||||
&& all ((>30) . dist (_rpPos rp) . _rpPos) (filter usedlnks $ rm' ^. rmPos)
|
||||
usedlnks rp = case _rpType rp of
|
||||
UsedOutLink {} -> True
|
||||
UsedInLink {} -> True
|
||||
UnusedLink {} -> False
|
||||
NotLink {} -> False
|
||||
|
||||
|
||||
-- & rmOutPmnt . at i ?~ sensAboveDoor senseType 10 (atFstLnkOutShiftInward 100)
|
||||
|
||||
Reference in New Issue
Block a user