Debian Codegraph @

data/storyline/act2/dialogs/RRF-ManagmentTerminal.lua

raw
1 ---------------------------------------------------------------------
2 -- This file is part of Freedroid
3 --
4 -- Freedroid is free software; you can redistribute it and/or modify
5 -- it under the terms of the GNU General Public License as published by
6 -- the Free Software Foundation; either version 2 of the License, or
7 -- (at your option) any later version.
8 --
9 -- Freedroid is distributed in the hope that it will be useful,
10 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 -- GNU General Public License for more details.
13 --
14 -- You should have received a copy of the GNU General Public License
15 -- along with Freedroid; see the file COPYING. If not, write to the
16 -- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
17 -- MA 02111-1307 USA
18 ----------------------------------------------------------------------
19
20 local Npc = FDrpg.get_npc()
21 local Tux = FDrpg.get_tux()
22
23 return {
24 EveryTime = function()
25 play_sound("effects/Menu_Item_Deselected_Sound_0.ogg")
26 RRGateTerminal_prompt = "[email protected]: ~ #"
27
28 cli_says(_"Login : ", "NO_WAIT")
29 --; TRANSLATORS: username, maybe this should stay in lowercase letters?
30 Tux:says(_"guest", "NO_WAIT")
31 cli_says(_"Entering as guest", "NO_WAIT")
32 Npc:says("", "NO_WAIT")
33
34 if (cmp_obstacle_state("RRF-F9-ShortcutTrapdoor", "closed")) then
35 Npc:says(_"Shortcuts: DISABLED", "NO_WAIT")
36 show("node0") hide("node10")
37 elseif (cmp_obstacle_state("RRF-F9-ShortcutTrapdoor", "opened")) then
38 Npc:says(_"Shortcuts: ENABLED", "NO_WAIT")
39 Npc:says(_"[b]NOTE[/b] The lift to Factory Core is at Floor 3.", "NO_WAIT")
40 show("node10") hide("node0")
41 else
42 Npc:says("GAME BUG. PLEASE REPORT, RRF_MANAGMENTTERMINAL F9 EveryTime LuaCode")
43 hide("node0", "node10")
44 end
45
46
47 if (cmp_obstacle_state("RRF-F6Gate", "closed")) then
48 Npc:says(_"Currently, maximum access is set to Security Development Office.", "NO_WAIT")
49 show("node30") hide("node40")
50 elseif (cmp_obstacle_state("RRF-F6Gate", "opened")) then
51 Npc:says(_"Currently, there is no maximum access set.", "NO_WAIT")
52 Npc:says(_"[b]WARNING[/b] People may die if they get lost!", "NO_WAIT")
53 show("node40") hide("node30")
54 else
55 Npc:says("GAME BUG. PLEASE REPORT, RRF_MANAGMENTTERMINAL F6 EveryTime LuaCode")
56 hide("node30", "node40")
57 end
58
59 cli_says(RRGateTerminal_prompt, "NO_WAIT")
60 show("node99")
61 end,
62
63 {
64 id = "node0",
65 --; TRANSLATORS: command, use lowercase here
66 text = _"enable shortcuts",
67 echo_text = false,
68 code = function()
69 --; TRANSLATORS: command, use lowercase here
70 Tux:says(_"enable shortcuts", "NO_WAIT")
71 if (Tux:has_item("MS Stock Certificate")) then
72 Npc:says(_"MS Stock Certificate found and validated. Welcome, [b]Will Gapes[/b]!", "NO_WAIT")
73 Npc:says(_"Shortcuts status: ENABLED")
74 change_obstacle_state("RRF-F9-ShortcutTrapdoor", "opened")
75 else
76 Npc:says(_"I'm afraid you are not authorized to do so.")
77 Npc:says(_"Please contact your Chief Officer in order to change this setting.")
78 end
79 cli_says(RRGateTerminal_prompt, "NO_WAIT")
80 hide("node0") show("node10")
81 end,
82 },
83 {
84 id = "node10",
85 --; TRANSLATORS: command, use lowercase here
86 text = _"disable shortcuts",
87 echo_text = false,
88 code = function()
89 --; TRANSLATORS: command, use lowercase here
90 Tux:says(_"disable shortcuts", "NO_WAIT")
91 if (Tux:has_item("MS Stock Certificate")) then
92 Npc:says(_"MS Stock Certificate found and validated. Thanks for visiting, [b]Will Gapes[/b]!", "NO_WAIT")
93 Npc:says(_"Shortcuts status: DISABLED")
94 change_obstacle_state("RRF-F9-ShortcutTrapdoor", "closed")
95 else
96 Npc:says(_"I'm afraid you are not authorized to do so.")
97 Npc:says(_"Please contact your Chief Officer in order to change this setting.")
98 end
99 cli_says(RRGateTerminal_prompt, "NO_WAIT")
100 hide("node10") show("node0")
101 end,
102 },
103 {
104 id = "node30",
105 --; TRANSLATORS: command, use lowercase here
106 text = _"disable maximum access",
107 echo_text = false,
108 code = function()
109 --; TRANSLATORS: command, use lowercase here
110 Tux:says(_"disable maximum access", "NO_WAIT") -- misleading on purpose
111 Npc:says(_"[b]SECURITY WARNING[/b] Control Gate is now disabled.", "NO_WAIT")
112 Npc:says(_"[b]WARNING[/b] People may die if they get lost!")
113 change_obstacle_state("RRF-F6Gate", "opened")
114 cli_says(RRGateTerminal_prompt, "NO_WAIT")
115 hide("node30") show("node40")
116 end,
117 },
118 {
119 id = "node40",
120 --; TRANSLATORS: command, use lowercase here
121 text = _"enable maximum access",
122 echo_text = false,
123 code = function()
124 --; TRANSLATORS: command, use lowercase here
125 Tux:says(_"enable maximum access", "NO_WAIT")
126 Npc:says(_"[b]SECURITY[/b] Control Gate is now enabled.") -- No one needs to die!
127 change_obstacle_state("RRF-F6Gate", "closed")
128 cli_says(RRGateTerminal_prompt, "NO_WAIT")
129 hide("node40") show("node30")
130 end,
131 },
132 {
133 id = "node99",
134 --; TRANSLATORS: command, use lowercase here
135 text = _"logout",
136 echo_text = false,
137 code = function()
138 --; TRANSLATORS: command, use lowercase here
139 Tux:says(_"logout", "NO_WAIT")
140 Npc:says(_"Exiting...")
141 play_sound("effects/Menu_Item_Selected_Sound_1.ogg")
142 end_dialog()
143 end,
144 },
145 }