This commit is contained in:
2022-06-02 10:31:22 +01:00
parent e112006b46
commit c4fc044845
7 changed files with 37 additions and 37 deletions
+5 -7
View File
@@ -69,12 +69,10 @@ addWarningTerminal outplid = (rmName .++~ "warningTerm-")
else Just (ltpos, rpdir)
_ -> Nothing
termMessages trid = ops trid (genTermMessage $ const ["OPEN DOOR?"])
-- <&> termFutureLines %~ (++ [TerminalLineChoice 0 (ops trid)])
ops trid f gw w = f gw w & termFutureLines %~
(++ [ TerminalLineInput 0 [unlockCommand trid] [quitCommand,helpCommand,infoCommand theinfo,commandsCommand]])
ops trid f gw w = f gw w & termFutureLines ++.~ [ TerminalLineInput 0
[unlockCommand trid,quitCommand]
[helpCommand,infoCommand theinfo,commandsCommand]
]
unlockCommand trid = singleCommand "OPEN" ["YES","Y"] "OPEN THE CONNECTED DOOR." (toggledoor trid)
-- (++ [ TerminalLineChoice 0 [ ("TOGGLE", toggledoor trid)
-- , ("EXIT", id)
-- ]])
toggledoor trid w' = w' & triggers . ix (fromJust $ _plMID trid) .~ const True
theinfo = "DOOR CONTROLABLE BY ENTERING \"OPEN\". THIS TERMINAL CANNOT CLOSE THE DOOR."
theinfo = "DOOR CONTROLABLE WITH THE \"OPEN\" COMMAND. THIS TERMINAL CANNOT CLOSE THE DOOR."