Cleanup
This commit is contained in:
@@ -38,21 +38,21 @@ import qualified Data.Map.Strict as M
|
||||
--import qualified Data.Text as T
|
||||
|
||||
|
||||
warningRooms :: RandomGen g => Int -> State g (MetaTree Room String)
|
||||
warningRooms n = do
|
||||
warningRooms :: RandomGen g => String -> Int -> State g (MetaTree Room String)
|
||||
warningRooms str n = do
|
||||
rm <- do
|
||||
tr <- tanksRoom [] []
|
||||
takeOne [roomNgon 8 200, roomRectAutoLinks 200 200,tr]
|
||||
cenroom <- shuffleLinks $ addWarningTerminal n rm
|
||||
cenroom <- shuffleLinks $ addWarningTerminal str n rm
|
||||
rToOnward "warningRooms" $ treePost [ door, cenroom, triggerDoorRoom n, cleatOnward door]
|
||||
|
||||
addWarningTerminal :: Int -> Room -> Room
|
||||
addWarningTerminal outplid = (rmName .++~ "warningTerm-")
|
||||
addWarningTerminal :: String -> Int -> Room -> Room
|
||||
addWarningTerminal str outplid = (rmName .++~ "warningTerm-")
|
||||
. (rmOutPmnt .~ [OutPlacement outplace outplid])
|
||||
where
|
||||
outplace = extTrigLitPos
|
||||
(atFstLnkOutShiftBy (\(p,a) -> (p +.+ rotateV a (V2 18.5 (-2.5)), a)))
|
||||
(Just . set plSpot (rprShift moveToSideFirstOutLink) . putTerminal terminalColor . termMessages)
|
||||
(Just . set plSpot (rprShift moveToSideFirstOutLink) . putMessageTerminal terminalColor . termMessages)
|
||||
termMessages trpl = basicTerminal & tmScrollCommands .:~ toggleCommand
|
||||
& tmToggles .~ M.fromList
|
||||
[("DOOR",TerminalToggle (fromJust $ _plMID trpl) (const (const True)))]
|
||||
|
||||
Reference in New Issue
Block a user