Debian Codegraph @

data/storyline/act1/dialogs/DSB-MachineDeckControl.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 FirstTime = function()
25 play_sound("effects/Menu_Item_Deselected_Sound_0.ogg")
26 cli_says(_"Login : ", "NO_WAIT")
27 Tux:says(_"admin", "NO_WAIT")
28 cli_says(_"Password : ", "NO_WAIT")
29 Tux:says(_"*******", "NO_WAIT")
30 local day, hour, minute = game_date()
31 DSB_MDC_year = os.date("%Y") + 45 -- current year + 45
32 DSB_MDC_date = string.format(_"Day %d, %02d:%02d", day, hour, minute)
33 --; TRANSLATORS: %s = a date , %d = a year number
34 cli_says(_"First login from /dev/ttySO on %s %d", DSB_MDC_date, DSB_MDC_year, "NO_WAIT")
35 Npc:says("", "NO_WAIT")
36 end,
37
38 EveryTime = function()
39 DSB_MachineDeckControl_prompt = "[email protected]: ~ #"
40 cli_says(DSB_MachineDeckControl_prompt, "NO_WAIT")
41 if (not Tux:done_quest("Opening access to MS Office")) then
42 show("node7")
43 end
44 show("node99", "node1")
45 end,
46
47 {
48 id = "node1",
49 text = _"passwd",
50 code = function()
51 Npc:says(_"Changing password for admin. Enter new password: ")
52 Npc:says(_"Enter new password again: ")
53 Npc:says(_"Password successfully changed.")
54 DSB_MDC_password = true
55 cli_says(DSB_MachineDeckControl_prompt, "NO_WAIT")
56 hide("node1")
57 end,
58 },
59 {
60 id = "node7",
61 text = _"shieldmgr --disable --force",
62 code = function()
63 Npc:says(_"Disabling disruptor shield... ")
64 Npc:says(_"Shield disabled.")
65 if (DSB_MDC_password) then
66 Tux:end_quest("Opening access to MS Office", _"I've taken over the control terminal and disabled the disruptor shield. Now, I should go to the Hell Fortress and hack the MS firmware update system.")
67 hide("node7")
68 play_sound("effects/Menu_Item_Selected_Sound_1.ogg")
69 end_dialog()
70 else
71 Npc:says(_"WARNING: Another user is using this computer.")
72 Npc:says(_"Disruptor shield is active.")
73 end
74 cli_says(DSB_MachineDeckControl_prompt, "NO_WAIT")
75 end,
76 },
77 {
78 id = "node99",
79 text = _"logout",
80 code = function()
81 Npc:says(_"Exiting...")
82 play_sound("effects/Menu_Item_Selected_Sound_1.ogg")
83 end_dialog()
84 end,
85 },
86 }