Debian Codegraph @

data/storyline/act1/dialogs/614_portal.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 --[[WIKI
20 PERSONALITY = { "Robotic" },
21 MARKERS = { },
22 BACKSTORY = "$$NAME$$ is part of the Special Area across bridge on level 42. He is a 614 droid guarding the Portal..."
23 WIKI]]--
24
25 local Npc = FDrpg.get_npc()
26 local Tux = FDrpg.get_tux()
27
28 return
29 {
30 FirstTime = function()
31 show("node4")
32 end,
33
34 EveryTime = function()
35 show("node0", "node5", "node99")
36 end,
37
38 ------------------------------
39 -- 614_sub
40 --
41 {
42 topic = "614_sub",
43 generator = include("614_sub"),
44 },
45 --
46 ------------------------------
47
48 {
49 id = "node0",
50 text = _"Who are you?",
51 code = function()
52 push_topic("614_sub")
53 -- call 614_sub subdialog
54 next("614_sub.everytime")
55 end,
56 },
57 {
58 -- called after the end of 614_sub subdialog
59 id = "after-614_sub",
60 code = function()
61 pop_topic()
62 hide("node0")
63 end,
64 },
65 {
66 id = "node4",
67 text = _"Have you detected any hostile bot activity?",
68 code = function()
69 Npc:says(_"ERROR: unknown command. Searching for similar commands...")
70 Npc:says(_"...")
71 Npc:says(_"...")
72 Npc:says(_"ERROR! Similar command not found! Using advanced search...")
73 Npc:says(_"...")
74 Npc:says(_"Executable 'bin/hostile' found. Executing...")
75 Tux:says(_"OUCH!")
76 play_sound("effects/Influencer_Scream_Sound_0.ogg")
77 freeze_tux(5)
78 hide("node4")
79 end_dialog()
80 end,
81 },
82 {
83 id = "node5",
84 text = _"What are your orders?",
85 code = function()
86 Npc:says(_"My orders are to protect the living beings from attacks by hostile bots.")
87 Npc:says(_"This has top priority. There are no other priorities.")
88 hide("node5")
89 end,
90 },
91 {
92 id = "node99",
93 text = _"See you later.",
94 code = function()
95 Npc:says(_"Resuming guard program....")
96 end_dialog()
97 end,
98 },
99 }