Debian Codegraph @

data/storyline/act1/dialogs/MiniFactory-Terminal.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 terminal = _"dixon@autofactory: ~ # "
27
28 cli_says(_"Login : ", "NO_WAIT")
29 -- ; TRANSLATORS: dixon = name of the npc, uncapitalized
30 Tux:says(_"dixon", "NO_WAIT")
31 cli_says(_"Password : ", "NO_WAIT")
32 Tux:says("*******", "NO_WAIT")
33 Npc:says(_"Hello, Dave.")
34 Npc:says(_"Last login from /dev/ttyS0 on Sun, 3 dec 2056.", "NO_WAIT")
35 cli_says(terminal, "NO_WAIT")
36 if (seen_autofactory_sudo_joke) then
37 show("node1")
38 else
39 show("node0")
40 end
41 show("node99")
42 end,
43
44 {
45 id = "node0",
46 text = _"autofactory start",
47 code = function()
48 Npc:says(_"I'm sorry. I'm afraid I can't let you do that.")
49 cli_says(terminal, "NO_WAIT")
50 hide("node0") show("node1")
51 seen_autofactory_sudo_joke = true
52 end,
53 },
54 {
55 id = "node1",
56 text = _"sudo autofactory start",
57 code = function()
58 Npc:says(_"Commencing Initialization Process")
59 Npc:says(_"Activating Production Line...", "NO_WAIT")
60 Npc:says(_"SUCCESS")
61 Npc:says(_"Configuring Fabrication Data...", "NO_WAIT")
62 Npc:says(_"SUCCESS")
63 Npc:says(_"Testing Assembly Hardware...", "NO_WAIT")
64 if (not Lvl6_elbow_grease_applied) then
65 Npc:says(_"DECLINE")
66 Npc:says(_"Error code: 0x6465636c6365")
67 Npc:says(_"Please read the manual and follow the instructions.")
68 cli_says(_"WARNING: ", "NO_WAIT")
69 Npc:says(_"The manual is outdated. Please refer to the fixed directive 33 in the reference book.")
70 cli_says(_"WARNING: ", "NO_WAIT")
71 Npc:says(_"The reference book is outdated. Please refer to the ticket 2012 in the technician database.")
72 cli_says(_"WARNING: ", "NO_WAIT")
73 Npc:says(_"The ticket 2012 is outdated. Please refer to the manual.")
74 Npc:says(_"Cancelling Initialization Process...")
75 Npc:says(_"Initialization has been cancelled to prevent any damage.")
76 MiniFactory_init_failed = true
77 else
78 Npc:says(_"SUCCESS")
79 Npc:says(_"Final Initialization Instructions...")
80 Npc:says(_"The Automated Factory is booted up and ready to work.", "NO_WAIT")
81 if (Maintenace_Terminal_want_sandwich) then
82 cli_says(_"WARNING: ", "NO_WAIT")
83 Npc:says(_"The Automated Factory is unable to make a sandwich.")
84 end
85 Minifactory_online = true
86 MiniFactory_init_failed = false
87 show("node10", "node20")
88 end
89 hide("node1")
90 cli_says(terminal, "NO_WAIT")
91 end,
92 },
93 {
94 id = "node10",
95 text = _"craft --addon",
96 code = function()
97 craft_addons()
98 cli_says(terminal, "NO_WAIT")
99 end,
100 },
101 {
102 id = "node20",
103 text = _"assemble --item --addon",
104 code = function()
105 upgrade_items()
106 cli_says(terminal, "NO_WAIT")
107 end,
108 },
109 {
110 id = "node99",
111 text = _"logout",
112 code = function()
113 Npc:says(_"Exiting", "NO_WAIT")
114 Npc:says(_"Goodbye Dave.")
115 hide("node10", "node20")
116 play_sound("effects/Menu_Item_Selected_Sound_1.ogg")
117 end_dialog()
118 end,
119 },
120 }