1 from go_to_adjacent_systems
import *
2 from go_somewhere_significant
import *
26 print "setting up mission"
30 self.
you=VS.getPlayerX(cp)
32 self.adjsys.Print(
"You should start in the system named %s",
"Then jump to %s",
"Lastly, jump to %s, your final destination",
"cargo mission",1)
35 def __init__ (self,savevar,jumps=(),destination=
''):
36 Director.Mission.__init__(self);
37 print 'Directions: Starting'
38 global isambushrunning
44 print 'Directions: Stopping: directions already running! (before mission restore)'
47 self.
cp=VS.getCurrentPlayer()
56 name = self.you.getName ()
59 global isambushrunning
62 VS.terminateMission(1)
70 if testun.getName().
lower()==name.lower()
or testun.getFullname().
lower()==name.lower():
76 if testun.isDockableUnit():
81 for i
in range(un.numCargo()):
82 if (un.GetCargoIndex(i).GetMissionFlag()):
83 lis.append(un.GetCargoIndex(i).GetContent())
89 if (VS.getPlayerX(self.
cp).isNull()):
92 if (self.
arrived and self.base.isNull()):
103 if (
not self.adjsys.Execute()):
108 dis=self.you.getSignificantDistance(self.
base)
110 VS.setCompleteness(self.
obj,1)
111 if (dis<50
or self.base.isDocked(self.
you)
or self.you.isDocked(self.
base)):
118 self.
obj=VS.addObjective(
"Deliver cargo to %s." % self.
destination);
119 VS.setOwner(self.
obj,self.
you)
120 VS.setCompleteness(self.
obj,0)