From badce25b9b7d9fa9cffba38b3d88995d7e3f348c Mon Sep 17 00:00:00 2001 From: Allanis Date: Sat, 22 Jun 2013 19:14:38 +0100 Subject: [PATCH] [Fix] Mission stuff. --- dat/missions/emp_cargo00.lua | 12 +++++++++++- dat/missions/emp_scout00.lua | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/dat/missions/emp_cargo00.lua b/dat/missions/emp_cargo00.lua index c889b24..506d4ea 100644 --- a/dat/missions/emp_cargo00.lua +++ b/dat/missions/emp_cargo00.lua @@ -20,13 +20,23 @@ You aren't too sure of what to make of your encounter with the Empire, only time end function create() + -- Target destination. + local i = 0 + repeat + dest = space.getPlanet(misn.factions()) + i = i+1 + until dest ~= space.landName() or i > 10 + -- Infinate loop protection. + if i > 10 then + misn.finish(false) + end + -- Intro text. tk.msg(title[1], text[1]) if tk.yesno(title[1], text[2]) then misn.accept() - dest = space.getPlanet("Empire"); -- Mission details. reward = 3000 misn.setTitle(misn_title) diff --git a/dat/missions/emp_scout00.lua b/dat/missions/emp_scout00.lua index 4f86485..96799fe 100644 --- a/dat/missions/emp_scout00.lua +++ b/dat/missions/emp_scout00.lua @@ -23,6 +23,11 @@ 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