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

Public Member Functions

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

 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 3 of file cleansweep.py.

Constructor & Destructor Documentation

def __init__ (   self,
  numsystemsaway,
  num_points,
  distance,
  creds,
  jumps,
  donevar,
  minships,
  maxships,
  encounterprob,
  capshipprob,
  faction,
  forceattack,
  canrunaway 
)

Definition at line 4 of file cleansweep.py.

References patrol_enemies.__init__().

4 
5  def __init__(self,numsystemsaway, num_points,distance,creds,jumps,donevar,minships,maxships,encounterprob,capshipprob,faction, forceattack,canrunaway):
6  patrol_enemies.patrol_enemies.__init__(self,numsystemsaway, num_points,distance,creds,jumps,donevar,minships,maxships,encounterprob,capshipprob,faction,forceattack)
7  self.enum=0
8  self.canrunaway=canrunaway
9  self.activeships=[]
10  self.guaranteed_success=False

Member Function Documentation

def Dead (   self,
  activeship 
)

Definition at line 23 of file cleansweep.py.

References cleansweep.canrunaway.

23 
24  def Dead(self,activeship):
25  import VS
26  runawaydist=7000
27  tmp = (self.canrunaway and activeship[0].GetHullPercent()<.7)
28  if tmp:
29  VS.setCompleteness(activeship[1],0.0)
return ((tmp and self.you.getDistance(activeship[0])>runawaydist) or not activeship[0])
def DeletePatrolPoint (   self,
  num,
  nam 
)

Definition at line 21 of file cleansweep.py.

References patrol_enemies.DeletePatrolPoint().

def Execute (   self)

Definition at line 30 of file cleansweep.py.

References cleansweep.activeships, cleansweep.Dead(), cleansweep.enum, patrol.Execute(), cleansweep.guaranteed_success, and cleansweep.RealSuccessMission().

30 
31  def Execute(self):
32  if (self.enum>=len(self.activeships)):
33  self.enum=0
34  else:
35  if (self.Dead(self.activeships[self.enum])):
36  import VS
37  VS.setCompleteness(self.activeships[self.enum][1],1.0)
38  del self.activeships[self.enum]
39  else:
40  self.enum+=1
41  if (len(self.activeships)==0 and self.guaranteed_success):
42  self.RealSuccessMission()
43  else:
patrol_enemies.patrol_enemies.Execute(self)
def RealSuccessMission (   self)

Definition at line 19 of file cleansweep.py.

References patrol_enemies.SuccessMission().

def SuccessMission (   self)

Definition at line 17 of file cleansweep.py.

References cleansweep.guaranteed_success.

17 
18  def SuccessMission(self):
self.guaranteed_success=True
def Track (   self,
  shiptype 
)

Definition at line 11 of file cleansweep.py.

References unit.getUnitFullName(), escort_mission.you, patrol.you, directions_mission.you, go_to_adjacent_systems.you, bounty.you, escort_local.you, defend.you, and cargo_mission.you.

11 
12  def Track(self,shiptype):
13  import VS
14  obj=VS.addObjective("Destroy %s."%(unit.getUnitFullName(shiptype,True)))
15  VS.setOwner(obj,self.you)
16  VS.setCompleteness(obj,-1.0)
self.activeships.append((shiptype,obj))

Field Documentation

activeships

Definition at line 8 of file cleansweep.py.

canrunaway

Definition at line 7 of file cleansweep.py.

enum

Definition at line 6 of file cleansweep.py.

guaranteed_success

Definition at line 9 of file cleansweep.py.


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