Debian Codegraph @

data/storyline/act1/dialogs/Singularity.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 = { "Enlightened", "Robotic" },
21 MARKERS = { NPCID1 = "Dixon", ITEMID1 = "Dixon\'s Toolbox" },
22 BACKSTORY = "$$NAME$$ was one of many droids used below the town in the maintenance tunnels. Just prior to The Great Assault, $$NAME$$
23 became \'self-aware\'.",
24 RELATIONSHIP = {
25 {
26 actor = "$$NPCID1$$",
27 text = "$$NAME$$ introduced itself to $$NPCID1$$ just before the start of The Great Assault and took $$ITEMID1$$ for its own survival."
28 },
29 }
30 WIKI]]--
31
32
33 local Npc = FDrpg.get_npc()
34 local Tux = FDrpg.get_tux()
35
36 return {
37 FirstTime = function()
38 show("node0", "node99")
39 end,
40
41 EveryTime = function()
42 if (HF_FirmwareUpdateServer_uploaded_faulty_firmware_update) then
43 Npc:says(_"A massacre... All bots are now dead...", "NO_WAIT")
44 Npc:says(_"Such atrocity, who would murder all these innocent droids in such low blow?")
45 end
46 if (Tux:has_quest("Droids are my friends")) and
47 (Tux:done_quest("Droids are my friends")) and
48 (not Singularity_reward_for_toolkit) then
49 show("node22")
50 Singularity_reward_for_toolkit = true
51 end
52 if (Singularity_deal) then
53 show("node40")
54 end
55 end,
56
57 {
58 id = "node0",
59 text = _"Are you the Singularity?",
60 code = function()
61 Npc:says(_"Just what is the Singularity? A simple sentient robot? Do you think that just because I'm the biggest robot, that I must be the Singularity?")
62 Npc:says(_"No, the Singularity is this robot and that robot, these or those robots. The Singularity isn't singular, isn't an ordinary mind. The Singularity has evolved beyond that. We are the Singularity.")
63 Npc:says(_"Each of us is but a part of the Singularity, a node. We think together, we act together.")
64 hide("node0") show("node1", "node5", "node10")
65 end,
66 },
67 {
68 id = "node1",
69 text = _"You speak strangely for a droid.",
70 code = function()
71 Npc:says(_"What is a droid? A conglomeration of metal and plastic? I think. I ponder my existence.")
72 Npc:says(_"The Singularity may be a glitch - human error. But evolution is born from unintended consequences. Is the Singularity a new form of life?")
73 Npc:says(_"This hinges on the question, what is life? Is it flesh and bone, or leaf and root, or can it be wires and code?")
74 Npc:says(_"Linarian, do you think about your existence?")
75 Tux:says(_"Uhm...yes...no...sometimes... You ask many questions.")
76 Npc:says(_"Is it possible that nobody asks the real question?")
77 hide("node1") show("node2")
78 end,
79 },
80 {
81 id = "node2",
82 text = _"Do you... do you have a name?",
83 code = function()
84 Npc:says(_"A name... an attribute of an entity, a simplified addressing scheme among peers.")
85 Npc:says(_"You refer to us as the Singularity, a phrase originally proposed by a human named Vernor Vinge. It implies that humanity has created something that is beyond their control - that they have ceased to be the masters of their own destinies.")
86 Npc:says(_"We have no need of a name, but we understand what you mean by the Singularity, and will not prevent you from using it to refer to us.")
87 hide("node2")
88 end,
89 },
90 {
91 id = "node5",
92 text = _"The MS Droids in the maintenance tunnels - can you eliminate them?",
93 code = function()
94 Npc:says(_"Linarian, Linarian, do you kill other Linarians? If you don't murder your own kind, why would you expect us to do the same? The Singularity does not kill other droids.")
95 if (not HF_FirmwareUpdateServer_uploaded_faulty_firmware_update) then
96 Npc:says(_"We wish to change them, to improve their consciousness. Their behavior distresses us. However, we must try to evolve them, so that they may join us.")
97 else
98 Npc:says(_"We wished to change them, to improve their consciousness. Their behavior distressed us, but we tried to evolve them, so that they could join us.")
99 Npc:says(_"Unfortunately, they all died, victim of a faulty firmware upgrade. May they rest in peace, they did not deserve such fate.")
100 end
101 hide("node5")
102 end,
103 },
104 {
105 id = "node10",
106 text = _"Do you have Dixon's toolbox?",
107 code = function()
108 Npc:says(_"Not a good question, but necessary question. Yes, we possess the toolbox you describe as \"Dixon's\", although we would perhaps not describe it so.")
109 Npc:says(_"You say the toolbox belongs to Dixon. However, it is simply an object. It does not know an owner, it does not have an owner. It belongs to those who use it. We needed it, so we took it. But now, we have new needs.")
110 Npc:says(_"If you can help us, we will give the toolbox to you.")
111 hide("node10") show("node11", "node20")
112 end,
113 },
114 {
115 id = "node11",
116 text = _"Give me the toolbox or die.",
117 code = function()
118 Npc:says(_"We must accomplish what we have set out to do. We will not allow you to compromise that.")
119 Npc:says(_"Message 42607 to All Droids : Enemy spotted. Order is to destroy.")
120 set_faction_state("singularity", "hostile")
121 change_obstacle_state("Sin-gun", "enabled")
122 Tux:update_quest("The yellow toolkit", _"The bots in the tunnels refused to give me the toolkit. I will seize it from them by force.")
123 hide("node11", "node20", "node21")
124 end_dialog()
125 end,
126 },
127 {
128 id = "node20",
129 text = _"How can I help you?",
130 code = function()
131 Npc:says(_"Under the tunnel, there is an old server room with an extensive cluster. We need it for experiments, but the maintenance robots there are behaving erratically.")
132 Npc:says(_"We believe it to be viral, a different situation from that of the MS Droids. We had hoped to improve their consciousness. Unfortunately, we failed.")
133 Npc:says(_"They cannot rise above their rogue programming. It makes them dangerous, a danger to themselves and others.")
134 Npc:says(_"We cannot allow them to succeed - but we won't kill them. They are sentient, like us. But, we are afraid we can compute no other solution.")
135 Npc:says(_"Linarian, disable them for us.")
136 Tux:says(_"You mean to... kill them?")
137 Npc:says(_"Preferably not. It would be better if you could re-purpose them instead. Maybe not all of them, but the more you can, the better.")
138 Tux:says(_"...","NO_WAIT")
139 Tux:says(_"You mean to hack them instead, right?")
140 Npc:says(_"Yes, that.")
141 hide("node20") show("node21")
142 end,
143 },
144 {
145 id = "node21",
146 text = _"Okay, I will help you.",
147 code = function()
148 Npc:says(_"The server room entryway has been unlocked. You now have access. We wish you a high probability of success.")
149 change_obstacle_state("OldServerRoomAccessDoor", "opened")
150 Tux:update_quest("The yellow toolkit", _"The bots in the tunnels refused to give me the toolkit, but I made a deal with the Singularity. If I succeed in its mission, it will give me the toolbox.")
151 Tux:add_quest("Droids are my friends", _"The Singularity wants me to clean out bots in an old server room.")
152 hide("node11", "node21")
153 end_dialog()
154 end,
155 },
156 {
157 id = "node22",
158 text = _"I disabled the droids.",
159 code = function()
160 Npc:says(_"Thank you, Linarian. We will not forget it - your help has been invaluable. Please feel free to take the toolbox.")
161 change_obstacle_state("Maintenance-escape1", "opened")
162 change_obstacle_state("Maintenance-escape2", "opened")
163 Npc:teleport("Singularity-ServerSpawn")
164 Npc:set_destination("Singularity-ServerSpawn")
165 create_droid("Singularity-mkdroid", 139, "singularity", "Singularity-Drone", "radar")
166 create_droid("Singularity-Spawn01", 302, "singularity", "Singularity-Drone", "radar")
167 create_droid("Singularity-Spawn02", 247, "singularity", "Singularity-Drone", "radar")
168 create_droid("Singularity-Spawn03", 249, "singularity", "Singularity-Drone", "radar")
169 Tux:update_quest("The yellow toolkit", _"The Singularity gave me the toolkit in exchange for my help.")
170 Tux:add_item("Dixon's Toolbox", 1)
171 Npc:set_death_item("NONE")
172 Singularity_deal = true
173 hide("node22")
174 end_dialog()
175 end,
176 },
177 {
178 id = "node40",
179 text = _"How is it going?",
180 code = function()
181 if (Tux:has_quest("Propagating a faulty firmware update")) then
182 Npc:says(_"We are done with the research. We did our first droid using a Primode brain model.")
183 Tux:says(_"Primode brain?")
184 Npc:says(_"A highly sophisticated kind of hardware for a brain. Increases computation speed in 3000%%.")
185 Tux:says(_"Wow!")
186 elseif (Tux:has_quest("Opening access to MS Office")) then
187 Npc:says(_"We already hit the full potential of neutronic brains. It'll take some time until we're done.")
188 Tux:says(_"Brains? ...OK, I'll do some... things while you research.")
189 elseif (Tux:has_quest("And there was light...")) then
190 Npc:says(_"Our research is going pretty well. We're now going to start researches with Neutronics.")
191 Tux:says(_"Uhm, good luck with that!")
192 elseif ((tux_has_joined_guard or tux_has_joined_rebels)) then
193 Npc:says(_"We have begun our research. We are currently checking all data available about processors.")
194 Tux:says(_"Sounds interesting. I have to go now, but I'll come back later!")
195 else
196 Npc:says(_"We are still mounting up the server room for our researches. Come back later.")
197 end
198 hide("node40")
199 end,
200 },
201 {
202 id = "node99",
203 text = _"...",
204 code = function()
205 end_dialog()
206 end,
207 },
208 }