Debian Codegraph @

data/storyline/act2/dialogs/IcePass-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 FirstTime = function()
25 show("node1")
26 end,
27
28 EveryTime = function()
29 play_sound("effects/Menu_Item_Deselected_Sound_0.ogg")
30 Npc:says(_"[b]The Ice Pass Access Control Terminal[/b]", "NO_WAIT")
31 Npc:says(_"This is a security area. Please identify or logout.")
32 Npc:says(_"[b]SYSTEM ERROR[/b] A critical error occurred. Please run the chkdsk command.")
33 show("node99")
34 end,
35
36 {
37 id = "node0",
38 --; TRANSLATORS: command, use lowercase here
39 text = _"identify",
40 code = function()
41 --play_sound("effects/Menu_Item_Selected_Sound_1.ogg") -- (Success)
42 play_sound("effects/Menu_Item_Deselected_Sound_0.ogg") -- (Failure)
43 if (not Tux:has_item("PC LOAD LETTER")) then
44 Npc:says(_"[b]FATAL ERROR[/b] - PC LOAD LETTER not found within A:\\.")
45 elseif (not Tux:has_item("PGP key")) then
46 Npc:says(_"[b]FATAL ERROR[/b] - PGP Public Key not found within B:\\.")
47 elseif (not Tux:has_item("Arcane Lore")) then
48 Npc:says(_"[b]FATAL ERROR[/b] - Linarian Hack Attempt detected. Connection refused.")
49 else
50 Npc:says(_"[b]POWER SUPPLY ERROR[/b] Insufficient energy to start up.", "NO_WAIT")
51 Npc:says(_"[b]GATE ERROR[/b] Unable to ping gate. Please ensure all wires are connected correctly.", "NO_WAIT")
52 Npc:says(_"[b]SYSTEM ERROR[/b] Unable to locate auth.bat file - Please run chkdsk command.") -- C:\\ is corrupted, use a defrag.
53 Npc:says(_"[b]WARNING[/b] Dangerous bots may be out on the Ice Pass, beware!")
54 end
55 Npc:says(_"[b]WARNING[/b] Errors detected, please run chkdsk command for more information.")
56 hide("node0") show("node2")
57 end,
58 },
59 {
60 id = "node1",
61 --; TRANSLATORS: command, use lowercase here
62 text = _"chkdsk",
63 code = function()
64 Npc:says(_"Please wait, we are now analyzing the peripheral systems connected to this terminal...")
65 Npc:says(_"ping gate ....... [b]FAILURE[/b]", "NO_WAIT")
66 Npc:says(_"The gate seems to be disconnected from this terminal, or permanently damaged.")
67 Npc:says(_"energy check ....... [b]FAILURE[/b]", "NO_WAIT")
68 Npc:says(_"Currently running on emergency power supply. Please wait a while.....")
69 Npc:says(_"Maximum power consumption allowed: [b]0.1%%[/b]", "NO_WAIT")
70 Npc:says(_"Power Control must allow at least [b]5%%[/b] of power usage in order to gates work.")
71 Npc:says(_"ping lab-015 gate ....... [b]FAILURE[/b]", "NO_WAIT")
72 Npc:says(_"Secret Laboratory gates are unresponsive. Dangerous bots may be out, beware!")
73 Npc:says(_"Please wait, we are now analyzing this terminal filesystem...")
74 Npc:says(_"Checking A:\\ ....... [b]FAILURE[/b]", "NO_WAIT")
75 Npc:says(_"PC LOAD LETTER not found.")
76 Npc:says(_"Checking B:\\ ....... [b]FAILURE[/b]", "NO_WAIT")
77 Npc:says(_"PGP key not found.")
78 Npc:says(_"Checking C:\\ ....... [b]FAILURE[/b]", "NO_WAIT")
79 Npc:says(_"Hard disk may be corrupted or permanently damaged.")
80 Npc:says(_"Checking D:\\ ....... [b]SUCCESS[/b]", "NO_WAIT")
81 Npc:says(_"Anti-human Hack Attempt System is operating normally.")
82 Npc:says(_"Checking E:\\ ....... [b]SUCCESS[/b]", "NO_WAIT")
83 Npc:says(_"Anti-linarian Hack Attempt System is operating normally.")
84 Tux:says(_"This terminal is so corrupted, that I believe it's better to don't touch it.")
85 Tux:says(_"Also, next time, I'll not let it run verbose!")
86 hide("node1") show("node0")
87 end,
88 },
89 {
90 id = "node2",
91 --; TRANSLATORS: command, use lowercase here
92 text = _"chkdsk --quiet --silent",
93 code = function()
94 -- Check for gate and for power control
95 Npc:says(_"[b]GATE ERROR[/b] The gate seems to be disconnected from this terminal, or permanently damaged.")
96 Npc:says(_"[b]POWER SUPPLY ERROR[/b] Power Control must allow at least [b]5%%[/b] of power usage in order to gates work.")
97
98 -- Check for A: Load Letter
99 if (not Tux:has_item("PC LOAD LETTER")) then
100 Npc:says(_"[b]BOOT ERROR[/b] PC LOAD LETTER not found.")
101 end
102
103 -- Check for B: PGP System
104 if (not Tux:has_item("PGP key")) then
105 Npc:says(_"[b]AUTHENTICATION ERROR[/b] PGP Public Key not found.")
106 end
107
108 -- Check for E: Linarian antihack
109 if (not Tux:has_item("Arcane Lore")) then
110 Npc:says(_"[b]SECURITY ADVICE[/b] Anti-Linarian Hack Attempt System is Beta. Bugs may show up.")
111 end
112
113 -- Check for C: and for lab-015
114 Npc:says(_"[b]SYSTEM ERROR[/b] Hard disk may be corrupted or permanently damaged.")
115 Npc:says(_"[b]WARNING[/b] Secret Laboratory gates are unresponsive. Dangerous bots may be out, beware!")
116
117 -- Overall analysis
118 --Tux:says(_"There are still too many errors. I'll need to fix a few things more before trying to identify myself again.")
119 Tux:says(_"I will never manage to fix this many errors. I better forget this terminal for now.")
120 end,
121 },
122 {
123 id = "node99",
124 --; TRANSLATORS: command, use lowercase here
125 text = _"logout",
126 code = function()
127 cli_says(_"Goodbye")
128 play_sound("effects/Menu_Item_Selected_Sound_1.ogg")
129 end_dialog()
130 end,
131 },
132 }