Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
ambush_scan Class Reference
Inheritance diagram for ambush_scan:
ambush directions_mission

Public Member Functions

def __init__
 
def FriendlyLaunch
 
def Execute
 
- Public Member Functions inherited from ambush
def privateSetupPlayer
 
def __init__
 
def setupPlayer
 
def Launch
 
def terminate
 
def Execute
 
- Public Member Functions inherited from directions_mission
def dir_privateSetupPlayer
 
def setupPlayer
 
def __init__
 
def takeCargoAndTerminate
 
def findUnit
 
def getCargo
 
def checkCargo
 
def Execute
 

Data Fields

 altGreetingText
 
 cargotype
 
 counter
 
 havelaunched
 
 dyntype
 
 timer
 
 inescapable
 
- Data Fields inherited from ambush
 timer
 
 inescapable
 
 havelaunched
 
 terminated
 
 faction
 
 systems
 
 numenemies
 
 dyntype
 
 dynfg
 
 greetingText
 
 cp
 
 delay
 
 AdjustFaction
 
 enemy
 
- Data Fields inherited from directions_mission
 arrived
 
 wasnull
 
 you
 
 adjsys
 
 var
 
 savedCargo
 
 jumps
 
 cp
 
 base
 
 destination
 
 mplay
 
 obj
 

Detailed Description

Definition at line 5 of file ambush_scan.py.

Constructor & Destructor Documentation

def __init__ (   self,
  savevar,
  systems,
  delay,
  faction,
  numenemies,
  dyntype = '',
  dynfg = '',
  greetingText = ["You have been scanned and contraband has been found in your hold.",
  You,
  should,
  have,
  dumped,
  it,
  while,
  you,
  had,
  the,
  chance,
  Now,
  you,
  die,
  directions = [],
  destination = '',
  AdjustFaction = True,
  cargotype = "Brilliance",
  altGreetingText = ["Thank you for delivering the cargo to us instead.",
  We,
  appreciate,
  your,
  candor,
  in,
  this,
  matter 
)

Definition at line 6 of file ambush_scan.py.

References ambush.__init__().

6 
7  def __init__(self,savevar,systems,delay,faction,numenemies,dyntype='',dynfg='',greetingText=["You have been scanned and contraband has been found in your hold.","You should have dumped it while you had the chance.","Now you die!"], directions=[], destination='',AdjustFaction=True,cargotype="Brilliance",altGreetingText=["Thank you for delivering the cargo to us instead.","We appreciate your candor in this matter."]):
8  ambush.ambush.__init__(self,savevar,systems,delay,faction,numenemies,dyntype,dynfg,greetingText,directions,destination,AdjustFaction)
9  self.altGreetingText=altGreetingText
10  self.cargotype=cargotype
self.counter=0

Member Function Documentation

def Execute (   self)

Definition at line 37 of file ambush_scan.py.

References ambush.cp, ambush.Execute(), ambush.inescapable, and ambush.systems.

37 
38  def Execute(self):
40  if(self.inescapable):
41  you=VS.getPlayerX(self.cp)
42  if you.getUnitSystemFile()==self.systems[0]:
43  self.timer=VS.GetGameTime();
44  if you.GetCargo(self.cargotype).GetQuantity()==0:
45  self.inescapable=0
46  un=VS.getUnit(self.counter)
47  if(un):
48  if un.getName()==self.cargotype or un.getName()=="Mission_Cargo":
49  self.counter=0
50  un=VS.getUnit(0)
51  while(un):
52  self.counter+=1
53  un=VS.getUnit(self.counter)
54  while (self.counter>0):
55  self.counter-=1
56  un=VS.getUnit(self.counter)
57  if (un):
58  if un.getName()==self.cargotype or un.getName()=="Mission_Cargo":
59  un.Kill()
60  if not self.havelaunched:
61  self.FriendlyLaunch()
62 
63  else:
64  #print self.cargotype +" not matched with "+un.getName()
65  self.counter+=1
66 
67  else:
68  self.counter=0
def FriendlyLaunch (   self)

Definition at line 11 of file ambush_scan.py.

11 
12  def FriendlyLaunch(self):
13  self.havelaunched=1
14  import launch
15  L=launch.Launch()
16  L.fg="Shadow"
17 
18  if(self.dyntype==""):
19  import faction_ships
21  L.type=self.dyntype
22  L.dyntype=self.dyntype
23  L.num=self.numenemies
24  L.faction=self.faction
25  L.minradius=3000
26  L.maxradius=4000
27  try:
28  import faction_ships
29  L.minradius*=faction_ships.launch_distance_factor
30  L.maxradius*=faction_ships.launch_distance_factor
31  except:
32  pass
33  you=VS.getPlayerX(self.cp)
34  friendly=L.launch(you)
35  import universe
36  universe.greet(self.altGreetingText,friendly,you);

Field Documentation

altGreetingText

Definition at line 8 of file ambush_scan.py.

cargotype

Definition at line 9 of file ambush_scan.py.

counter

Definition at line 10 of file ambush_scan.py.

dyntype

Definition at line 17 of file ambush_scan.py.

havelaunched

Definition at line 12 of file ambush_scan.py.

inescapable

Definition at line 44 of file ambush_scan.py.

timer

Definition at line 42 of file ambush_scan.py.


The documentation for this class was generated from the following file: