Add fix bug in terminal destruction effects
This commit is contained in:
@@ -30,6 +30,7 @@ import Dodge.RandomHelp
|
||||
|
||||
--import qualified Data.Set as S
|
||||
import Data.Maybe
|
||||
import qualified Data.Map.Strict as M
|
||||
--import Data.Char
|
||||
--import Data.Tree
|
||||
import Control.Monad.State
|
||||
@@ -47,18 +48,14 @@ warningRooms n = do
|
||||
|
||||
addWarningTerminal :: Int -> Room -> Room
|
||||
addWarningTerminal outplid = (rmName .++~ "warningTerm-")
|
||||
-- & rmOutPmnt .~ [OutPlacement (sensAboveDoor senseType 10 (atFstLnkOutShiftInward 100)) outplid]
|
||||
. (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)
|
||||
termMessages trid = defaultTermParams & addInputLine
|
||||
[unlockCommand trid,quitCommand]
|
||||
[helpCommand,infoCommand theinfo,commandsCommand]
|
||||
unlockCommand trid = singleCommand ["DOOR OPENED"] "OPEN" ["YES","Y"] "OPEN THE CONNECTED DOOR." (toggledoor trid)
|
||||
toggledoor trid w' = w' & triggers . ix (fromJust $ _plMID trid) .~ const True
|
||||
theinfo = "DOOR CONTROLABLE WITH THE \"OPEN\" COMMAND. THIS TERMINAL CANNOT CLOSE THE DOOR."
|
||||
termMessages trpl = basicTerminal & tmScrollCommands .:~ toggleCommand
|
||||
& tmToggles .~ M.fromList
|
||||
[("DOOR",TerminalToggle (fromJust $ _plMID trpl) (const (const True)))]
|
||||
|
||||
moveToSideFirstOutLink :: RoomPos -> Room -> Maybe (Point2,Float)
|
||||
moveToSideFirstOutLink rp rm = case rp ^? rpLinkStatus . rplsChildNum of
|
||||
|
||||
Reference in New Issue
Block a user