| 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 |
Npc:says(_"[b]Loading terminal...[/b]") |
| 27 |
if (Tux:has_item("PC LOAD LETTER")) then |
| 28 |
Npc:says(_"[b]Loading biologic credentials.[/b]") |
| 29 |
if (not RRTerminal_connected) then |
| 30 |
if (takeover(12)) then -- I prefer a fixed number of charges... |
| 31 |
show("node0") |
| 32 |
RRTerminal_connected = true |
| 33 |
Npc:says(_"[b]Welcome to this terminal.[/b]") |
| 34 |
else |
| 35 |
Npc:says(_"[b]Access Denied.[/b]") |
| 36 |
end |
| 37 |
else |
| 38 |
show("node0") |
| 39 |
if (Act2_DvorakPlanDownload) then |
| 40 |
show("endgame") |
| 41 |
end |
| 42 |
Npc:says(_"[b]Welcome to this terminal.[/b]") |
| 43 |
end |
| 44 |
else |
| 45 |
Npc:says(_"[b]No instructions to load this terminal.[/b]") |
| 46 |
Tux:says(_"help", "NO_WAIT") |
| 47 |
Npc:says(_"This terminal needs instructions to be loaded. Instructions could be requested at the final floors of factory north from town.") |
| 48 |
Npc:says(_"[b]WARNING:[/b] People capable of issuing authorization are all dead, killed by at weakest Battle droids.") |
| 49 |
-- Not everyone survives: Look for dead bodies. Battle necessary: Battle Droids. Authorization -- You won't get it at last floor. |
| 50 |
end_dialog() |
| 51 |
end |
| 52 |
show("node99") |
| 53 |
end, |
| 54 |
|
| 55 |
{ |
| 56 |
id = "node0", |
| 57 |
--; TRANSLATORS: command, user lowercase here |
| 58 |
text = _"help", |
| 59 |
code = function() |
| 60 |
if (not Act2_DvorakPlanDownload) then |
| 61 |
Npc:says(_"[b]Available commands: help, freeze, unfreeze, logout[/b]") |
| 62 |
else |
| 63 |
Npc:says(_"[b]Available commands: help, freeze, unfreeze, download, logout[/b]") |
| 64 |
end |
| 65 |
show("node1", "node2") |
| 66 |
end, |
| 67 |
}, |
| 68 |
{ |
| 69 |
id = "node1", |
| 70 |
--; TRANSLATORS: command, user lowercase here |
| 71 |
text = _"freeze", |
| 72 |
code = function() |
| 73 |
Npc:says(_"[b]Failure: Either the capsule is in use or too damaged to follow proper freezing protocols.[/b]") |
| 74 |
end, |
| 75 |
}, |
| 76 |
{ |
| 77 |
id = "node2", |
| 78 |
--; TRANSLATORS: command, user lowercase here |
| 79 |
text = _"unfreeze", |
| 80 |
code = function() |
| 81 |
if (Act2_ColemakAwake) then |
| 82 |
Npc:says(_"[b]Failure: Either the capsule is empty or too damaged to follow proper unfreezing protocols.[/b]") |
| 83 |
else |
| 84 |
Npc:says(_"[b]WARNING: Decryonization in progress![/b]") |
| 85 |
Npc:says(_"[b]...[/b]") |
| 86 |
Npc:says(_"[b]...[/b]") |
| 87 |
--; TRANSLATORS: Keep First Letter (Of Word) Case Please. |
| 88 |
Npc:says(_"[b]...Initiating Final Unfreezing Sequences...[/b]") |
| 89 |
Npc:says(_"[b]Removing remaining fluids...[/b]", "NO_WAIT") |
| 90 |
Npc:says(_"[b]Heating chamber to 300 K...[/b]", "NO_WAIT") |
| 91 |
Npc:says(_"[b]Disabling memory eraser...[/b]") |
| 92 |
Npc:says(_"[b]WARNING: PATIENT ID #1337 'Colemak' HAS BEEN UNCRYONIZED![/b]") |
| 93 |
switch_background_music("NewTutorialStage.ogg") -- Things are now weird, so we add weird music! |
| 94 |
Act2_ColemakAwake=true |
| 95 |
Npc:says(_"Current Memory Loss: 0.00%%") -- ??? |
| 96 |
Npc:says(_"Security Personnel is on way. Estimated Time Arrival: 0 Second.") |
| 97 |
|
| 98 |
-- dispatch_event(eid, time) now we have an animation |
| 99 |
|
| 100 |
-- FIX: Check if they are alive. If not, respawn them to prevent unexpected errors. |
| 101 |
-- Please note current implementation allows them to shoot at you longer! |
| 102 |
if (SecurityChief:is_dead()) then |
| 103 |
create_droid('75-KillTuxPos01','GUB','ms','SecurityChief') |
| 104 |
end |
| 105 |
if (ProgrammingChief:is_dead()) then |
| 106 |
create_droid('75-KillTuxPos02','999','ms','ProgrammingChief') |
| 107 |
end |
| 108 |
|
| 109 |
-- make the cryo keepers hostile if they aren't already |
| 110 |
SecurityChief:set_faction("ms") |
| 111 |
ProgrammingChief:set_faction("ms") |
| 112 |
|
| 113 |
-- teletransport them, with delay |
| 114 |
play_sound("effects/new_teleporter_sound.ogg") |
| 115 |
SecurityChief:teleport("75-KillTuxPos01") |
| 116 |
SecurityChief:set_destination("75-KillTuxPos01") |
| 117 |
dispatch_event("75 Guard Turn Hostile", 0.5) |
| 118 |
|
| 119 |
-- Colemak will carry scripts from here on. |
| 120 |
end_dialog() |
| 121 |
end |
| 122 |
end, |
| 123 |
}, |
| 124 |
|
| 125 |
{ |
| 126 |
id = "endgame", |
| 127 |
--; TRANSLATORS: command, user lowercase here |
| 128 |
text = _"download", |
| 129 |
code = function() |
| 130 |
if (Tux:has_item("PGP key")) then |
| 131 |
switch_background_music("HellFortressTwo.ogg") -- New bgsong. |
| 132 |
Npc:says(_"[b]Now downloading[/b] Dvorak_Plans.lua", "NO_WAIT") |
| 133 |
Npc:says(_"[b]...Done.[/b]") |
| 134 |
play_sound("effects/Menu_Item_Selected_Sound_1.ogg") -- This is where I want sounds to be played!! |
| 135 |
Npc:says(_"[b]Dvorak_Plans.lua[/b]", "NO_WAIT") -- Thanks for playing FreedroidRPG! |
| 136 |
--; TRANSLATORS: %s = Tux:get_player_name() |
| 137 |
Npc:says(_"Using PGP key \"%s\", decrypted successfully.", Tux:get_player_name(), "NO_WAIT") |
| 138 |
Tux:end_quest("Message From An Old Friend", _"I managed to download Dvorak message!") |
| 139 |
Npc:says(_"\n--- Begin Text Message (from Dvorak) ---", "NO_WAIT") |
| 140 |
--; TRANSLATORS: %s = Tux:get_player_name() |
| 141 |
Npc:says(_"Hello, %s. I'm Dvorak.", Tux:get_player_name(), "NO_WAIT") |
| 142 |
Npc:says(_"I'm sure you are dying to talk to me.", "NO_WAIT") |
| 143 |
Npc:says(_"I'll think of something.", "NO_WAIT") |
| 144 |
Npc:says(_"For now you can only listen.", "NO_WAIT") |
| 145 |
Npc:says("You will have to live with it for now.", "NO_WAIT") |
| 146 |
Npc:says("") |
| 147 |
Npc:says(_"Do not worry. I always have a plan.", "NO_WAIT") |
| 148 |
Npc:says(_"First you must rescue me. This is top priority.", "NO_WAIT") |
| 149 |
Npc:says(_"I am looking for some former allies now.", "NO_WAIT") |
| 150 |
Npc:says(_"They'll help you when the time comes.", "NO_WAIT") |
| 151 |
Npc:says("") |
| 152 |
--; TRANSLATORS: %s = Tux:get_player_name() |
| 153 |
Npc:says(_"Where to find me? Whoa! Not so fast, %s.", Tux:get_player_name(), "NO_WAIT") |
| 154 |
Npc:says(_"We all want quality. And quality takes time.", "NO_WAIT") |
| 155 |
Npc:says(_"If you can't wait for it, please go for the Contribute section.", "NO_WAIT") |
| 156 |
Npc:says(_"Otherwise, this is all for now, I'm afraid.", "NO_WAIT") |
| 157 |
--; TRANSLATORS: %s = Tux:get_player_name() |
| 158 |
Npc:says(_"Good luck, %s. You'll need.", Tux:get_player_name(), "NO_WAIT") |
| 159 |
Npc:says("") |
| 160 |
Npc:says(_"Dvorak, First AI", "NO_WAIT") |
| 161 |
Npc:says("", "NO_WAIT") |
| 162 |
|
| 163 |
Npc:says(_"--- End Text Message ---", "NO_WAIT") |
| 164 |
Npc:says("", "NO_WAIT") |
| 165 |
--; TRANSLATORS: %s = Game Version |
| 166 |
Npc:says(_"[b]Thanks for playing FreedroidRPG %s![/b]", get_game_version()) |
| 167 |
|
| 168 |
--display_big_message(_"Thanks for playing FreedroidRPG!") |
| 169 |
display_big_message(_"--- Continues ---") |
| 170 |
win_game() |
| 171 |
end_dialog() |
| 172 |
else |
| 173 |
Npc:says(_"[b]Failure:[/b] You do not have a PGP Key.") |
| 174 |
-- TODO: “no while, no file” → the meaning is you won't get a key if you don't explore first. |
| 175 |
-- TODO: A better wording is yet to be found. |
| 176 |
Npc:says(_"[b]Information:[/b] The comment header of the file says: No while, no file.") |
| 177 |
end_dialog() |
| 178 |
end |
| 179 |
end, |
| 180 |
}, |
| 181 |
{ |
| 182 |
id = "node99", |
| 183 |
--; TRANSLATORS: command, user lowercase here |
| 184 |
text = _"logout", |
| 185 |
code = function() |
| 186 |
Npc:says(_"[b]Goodbye[/b]") |
| 187 |
play_sound("effects/Menu_Item_Selected_Sound_1.ogg") |
| 188 |
end_dialog() |
| 189 |
end, |
| 190 |
}, |
| 191 |
} |
| 192 |
|