[Change] Mission naming system.

This commit is contained in:
Allanis 2013-07-29 21:44:09 +01:00
parent 413ced137d
commit 731a1cee6a
3 changed files with 83 additions and 7 deletions

View File

@ -39,8 +39,8 @@
<faction>Unknown6</faction>
</avail>
</mission>
<mission name="Empire Scouting">
<lua>emp_scout00</lua>
<mission name="Collective Scouting">
<lua>emp_collective00</lua>
<flags>
<unique>1</unique>
</flags>
@ -51,4 +51,16 @@
<faction>Empire</faction>
</avail>
</mission>
<mission name="Collective Espionage">
<lua>emp_collective01</lua>
<flags>
<unique>1</unique>
</flags>
<avail>
<done>Collective Scouting</done>
<chance>50</chance>
<location>Bar</location>
<planet>Omega Station</planet>
</avail>
</mission>
</Missions>

View File

@ -23,11 +23,6 @@ else -- Default english.
end
function create()
-- Requirements.
if var.peek("es_cargo") ~= true then
misn.finish(false)
end
-- Intro text.
if tk.yesno(title[1], string.format(text[1], player.name()))
then

View File

@ -0,0 +1,69 @@
lang = lephisto.lang()
if lang == "es" then
-- Not translated atm.
else -- Default language.
misn_title = "Collective Espionage"
misn_reward = "None"
misn_desc = {}
misn_desc[1] = "Scan the Collective systems for wireless communications."
misn_desc[2] = "Travel back to %s in %s."
title = {}
title[1] = "Sargent Dimitri"
title[2] = "Collective Espionage"
title[3] = "Mission Accomplished"
text = {}
text[1] = [[You notice Sargent Dimitri at the bar, he calls you over.
"We managed to capture the drone after you located it. It didn't seem to be in good health. Our scientists are studying it as we speak, but we've found something strange in it. Some sort of weird wireless module. We'd like you to go run through the collective systems to see if you can pick up any strange wireless communications. Just do a quick run through, be careful of thhe Collective though. You interested in doing the run? It'll be dangerous."]]
text[2] = [["Just run through some systems while keeping your communications system on logging. We'll parse the results when you get back. Good luck."]]
text[3] = [[After landing, Sargent Dimitri greets you on the pad.
"I suppose all went well? Those drones can really give a beating. We'll have the researchers start looking at your logs right away. Meet me in the bar again in a while."]]
end
function create()
-- Intro text.
if tk.yesno(title[1], string.format(text[1], player.name())) then
misn.accept()
misn_stage = 0
systems_visited = 0 -- Number of Collective systems visited.
misn_base = "Omega Station"
-- Mission details.
misn.setTitle(misn_title)
misn.setReward(misn_reward)
misn.setDesc(string.format(misn_desc[1], misn_nearby))
tk.msg(title[2], text[2])
hook.enter("enter")
end
end
function enter()
factions = space.faction()
-- Increment system visited count.
if misn_stage == 0 and factions["Collective"] then
systems_visited = systems_visited + 1
-- Visited enough systems.
if misn_stage == 0 and systems_visited >= 2 then
misn.setDesc(string.format(misn_desc[2],
misn_base, space.getSystem(misn_base)))
misn_stage = 1
misn.setMarker(space.getsystem(misn_base)) -- Now we mark return to base.
hook.land("land")
end
end
end
function land()
planet = space.landName()
if misn_stage == 1 and planet == misn_base then
tk.msg(title[3], text[3])
player.modFaction("Empire", 5);
misn.finish(true)
end
end