Debian Codegraph @

data/storyline/act1/dialogs/MS-Factory-Addon-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 = "user@product_enhancer: ~ # "
27
28 cli_says(_"Login : ", "NO_WAIT")
29 -- ; TRANSLATORS: 'user' should perhaps not be translated
30 Tux:says(_"user", "NO_WAIT")
31 cli_says(_"Password : ", "NO_WAIT")
32 if (not has_ms_addon_password ) then
33 Tux:says("*******", "NO_WAIT")
34 Npc:says(_"Incorrect password or username")
35 Tux:says(_"Mmmh...")
36 cli_says(_"Password : ", "NO_WAIT")
37 Tux:says("***********", "NO_WAIT")
38 Npc:says(_"Incorrect password or username")
39 cli_says(_"Password : ", "NO_WAIT")
40 Tux:says("**", "NO_WAIT")
41 Npc:says(_"Login succeeded!")
42 Tux:says(_"Oh well....")
43 else
44 Tux:says("**", "NO_WAIT")
45 Npc:says(_"Login succeeded!")
46 end
47 Npc:says(_"Last login from /dev/ttyS0 on Fri, 9 dec 2059.", "NO_WAIT")
48 cli_says(terminal, "NO_WAIT")
49 has_ms_addon_password = true
50 show("node10", "node20", "node99")
51 end,
52
53 {
54 id = "node10",
55 text = _"craft --addon",
56 code = function()
57 craft_addons()
58 cli_says(terminal, "NO_WAIT")
59 end,
60 },
61 {
62 id = "node20",
63 text = _"assemble --item --addon",
64 code = function()
65 upgrade_items()
66 cli_says(terminal, "NO_WAIT")
67 end,
68 },
69 {
70 id = "node99",
71 text = _"logout",
72 code = function()
73 Npc:says(_"Exiting", "NO_WAIT")
74 Npc:says(_"M$ - What will be next?")
75 hide("node10", "node20")
76 play_sound("effects/Menu_Item_Selected_Sound_1.ogg")
77 end_dialog()
78 end,
79 },
80 }