Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
cleansweep_escort Class Reference
Inheritance diagram for cleansweep_escort:
cleansweep patrol_enemies patrol

Public Member Functions

def __init__
 
def LaunchAlly
 
def Execute
 
def DeletePatrolPoint
 
def RealSuccessMission
 
- Public Member Functions inherited from cleansweep
def __init__
 
def Track
 
def SuccessMission
 
def RealSuccessMission
 
def DeletePatrolPoint
 
def Dead
 
def Execute
 
- Public Member Functions inherited from patrol_enemies
def __init__
 
def Track
 
def SuccessMission
 
def DeletePatrolPoint
 
- Public Member Functions inherited from patrol
def __init__
 
def SuccessMission
 
def FailMission
 
def GeneratePatrolList
 
def DeletePatrolPoint
 
def FinishedPatrol
 
def Execute
 
def initbriefing
 
def loopbriefing
 
def endbriefing
 

Data Fields

 friendlyfaction
 
 allygreetingtext
 
 launchedyet
 
 ally
 
 lastnum
 
 allyobj
 
 enemygreetingtext
 
 engreetedyet
 
 enemygreetingtime
 
 encounterprob
 
 minships
 
 maxships
 
- Data Fields inherited from cleansweep
 enum
 
 canrunaway
 
 activeships
 
 guaranteed_success
 
- Data Fields inherited from patrol_enemies
 minships
 
 maxships
 
 encounterprob
 
 capshipprob
 
 faction
 
 forceattack
 
- Data Fields inherited from patrol
 donevar
 
 jnum
 
 cred
 
 patrolpoints
 
 objectives
 
 distance
 
 you
 
 quantity
 
 mplay
 
 adjsys
 

Detailed Description

Definition at line 4 of file cleansweep_escort.py.

Constructor & Destructor Documentation

def __init__ (   self,
  numsystemsaway,
  num_points,
  distance,
  creds,
  jumps,
  donevar,
  minships,
  maxships,
  encounterprob,
  capshipprob,
  faction,
  forceattack,
  canrunaway,
  friendlyfaction,
  allygreetingtext = [],
  lastnum = 3,
  enemygreetingtext = [] 
)

Definition at line 5 of file cleansweep_escort.py.

References cleansweep.__init__().

5 
6  def __init__(self,numsystemsaway, num_points,distance,creds,jumps,donevar,minships,maxships,encounterprob,capshipprob,faction, forceattack,canrunaway, friendlyfaction,allygreetingtext=[],lastnum=3,enemygreetingtext=[]):
7  cleansweep.cleansweep.__init__(self,numsystemsaway,num_points,distance,creds,jumps,donevar,minships,maxships,encounterprob,capshipprob,faction,forceattack,canrunaway)
8  self.friendlyfaction=friendlyfaction
9  self.allygreetingtext=allygreetingtext
10  self.launchedyet=False
11  self.ally=None
12  self.lastnum=lastnum
13  self.allyobj=0
14  self.enemygreetingtext=enemygreetingtext
15  self.engreetedyet=0
self.enemygreetingtime=0

Member Function Documentation

def DeletePatrolPoint (   self,
  num,
  nam 
)

Definition at line 53 of file cleansweep_escort.py.

References cleansweep_escort.ally, cleansweep_escort.encounterprob, cleansweep_escort.enemygreetingtime, cleansweep_escort.engreetedyet, cleansweep_escort.launchedyet, and patrol.patrolpoints.

53 
54  def DeletePatrolPoint(self,num,nam):
55  tmp=self.encounterprob
56  if (self.engreetedyet!=1 or VS.GetGameTime()>self.enemygreetingtime+10):
57  self.enemygreetingtime=VS.GetGameTime()
58  self.engreetedyet+=1
59  if (len(self.patrolpoints)==1 and self.launchedyet):
60  if (self.ally):
61  pos= self.you.Position()
62  pos=(pos[0],pos[1]+2*self.ally.rSize(),pos[2]+self.you.rSize()*2+2*self.ally.rSize())
63  self.ally.SetPosition(pos)#move him nearby to last nav point
64  self.encounterprob=1.0
65  self.minships=self.lastnum
66  self.maxships=self.lastnum
67  elif(self.engreetedyet==2):
68  import universe
69  universe.greet(self.enemygreetingtext,None,self.you)
70  self.encounterprob=1.0
self.encounterprob=tmp
def Execute (   self)

Definition at line 44 of file cleansweep_escort.py.

References cleansweep_escort.ally, cleansweep_escort.allyobj, cleansweep.Execute(), cleansweep_escort.LaunchAlly(), cleansweep_escort.launchedyet, escort_mission.you, patrol.you, directions_mission.you, go_to_adjacent_systems.you, bounty.you, defend.you, escort_local.you, and cargo_mission.you.

44 
45  def Execute(self):
46  if (self.adjsys.HaveArrived()):
47  if (self.you and not self.launchedyet):
48  self.launchedyet=True
49  self.LaunchAlly()
50  else:
51  if (not self.ally):
52  VS.setCompleteness(self.allyobj,-1.0)
cleansweep.cleansweep.Execute(self)
def LaunchAlly (   self)

Definition at line 16 of file cleansweep_escort.py.

References cleansweep_escort.ally, cleansweep_escort.allygreetingtext, cleansweep_escort.allyobj, cleansweep_escort.friendlyfaction, faction_ships.getRandomCapitol(), faction_ships.getRandomFighter(), unit.getUnitFullName(), universe.greet(), vsrandom.randrange(), escort_mission.you, patrol.you, directions_mission.you, go_to_adjacent_systems.you, bounty.you, defend.you, escort_local.you, and cargo_mission.you.

16 
17  def LaunchAlly(self):
18  import launch
19  import faction_ships
20  import universe
21  L = launch.Launch()
22  L.faction=self.friendlyfaction
23  L.fg="Patrol_Wing"
24  L.dynfg=""
25  L.minradius=3000.0
26  L.maxradius=4000.0
27  try:
28  L.minradius*=faction_ships.launch_distance_factor
29  L.maxradius*=faction_ships.launch_distance_factor
30  except:
31  pass
32  L.num=1
33  L.ai="default"
35  self.ally = L.launch(self.you)
36  self.ally.setMissionRelevant()
37  self.allyobj=VS.addObjective("Protect the %s"%unit.getUnitFullName(self.ally))
39  import vsrandom
40  L.num=vsrandom.randrange(3,6)
41  L.launch(self.you)
42 
43  universe.greet(self.allygreetingtext,self.ally,self.you)
def RealSuccessMission (   self)

Definition at line 72 of file cleansweep_escort.py.

References cleansweep_escort.ally, patrol.FailMission(), defend.FailMission(), escort_local.FailMission(), cleansweep_escort.launchedyet, and cleansweep.RealSuccessMission().

72 
73  def RealSuccessMission(self):
74  if (self.ally or not self.launchedyet):
76  else:
77  self.FailMission()

Field Documentation

ally

Definition at line 10 of file cleansweep_escort.py.

allygreetingtext

Definition at line 8 of file cleansweep_escort.py.

allyobj

Definition at line 12 of file cleansweep_escort.py.

encounterprob

Definition at line 63 of file cleansweep_escort.py.

enemygreetingtext

Definition at line 13 of file cleansweep_escort.py.

enemygreetingtime

Definition at line 15 of file cleansweep_escort.py.

engreetedyet

Definition at line 14 of file cleansweep_escort.py.

friendlyfaction

Definition at line 7 of file cleansweep_escort.py.

lastnum

Definition at line 11 of file cleansweep_escort.py.

launchedyet

Definition at line 9 of file cleansweep_escort.py.

maxships

Definition at line 65 of file cleansweep_escort.py.

minships

Definition at line 64 of file cleansweep_escort.py.


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