From 731a1cee6aee6cc11fcd0f2d23257ddc9efcce5e Mon Sep 17 00:00:00 2001 From: Allanis Date: Mon, 29 Jul 2013 21:44:09 +0100 Subject: [PATCH] [Change] Mission naming system. --- dat/mission.xml | 16 ++++- .../{emp_scout00.lua => emp_collective00.lua} | 5 -- dat/missions/emp_collective01.lua | 69 +++++++++++++++++++ 3 files changed, 83 insertions(+), 7 deletions(-) rename dat/missions/{emp_scout00.lua => emp_collective00.lua} (97%) create mode 100644 dat/missions/emp_collective01.lua diff --git a/dat/mission.xml b/dat/mission.xml index 1ab9418..61b79e5 100644 --- a/dat/mission.xml +++ b/dat/mission.xml @@ -39,8 +39,8 @@ Unknown6 - -emp_scout00 + +emp_collective00 1 @@ -51,4 +51,16 @@ Empire + +emp_collective01 + +1 + + +Collective Scouting +50 +Bar +Omega Station + + diff --git a/dat/missions/emp_scout00.lua b/dat/missions/emp_collective00.lua similarity index 97% rename from dat/missions/emp_scout00.lua rename to dat/missions/emp_collective00.lua index 42ce37b..488e726 100644 --- a/dat/missions/emp_scout00.lua +++ b/dat/missions/emp_collective00.lua @@ -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 diff --git a/dat/missions/emp_collective01.lua b/dat/missions/emp_collective01.lua new file mode 100644 index 0000000..bad9671 --- /dev/null +++ b/dat/missions/emp_collective01.lua @@ -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 +