Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
SystemInformation Class Reference

Public Member Functions

def __init__
 
def getInfo
 

Data Fields

 system
 
 faction
 

Static Public Attributes

int SECTOR_SYSTEM = 1
 
int SECTOR = 2
 
int SYSTEM = 3
 
int FACTION = 4
 

Detailed Description

A class the provides a query mechanism, for each
instance, that will return the specified system's
faction, name, or parent sector.

Definition at line 8 of file dynamic_news.py.

Constructor & Destructor Documentation

def __init__ (   self,
  system = VS.getSystemFile() 
)

Definition at line 17 of file dynamic_news.py.

17 
18  def __init__(self, system=VS.getSystemFile()):
19  self.system = system
20  self.faction = VS.GetGalaxyFaction(self.system)

Member Function Documentation

def getInfo (   self,
  inf_type = False 
)
Returns the information corresponding to the
given class variable.

Definition at line 21 of file dynamic_news.py.

References SystemInformation.FACTION, SystemInformation.faction, ClearFactionRecord.faction, PushRelation.faction, PopRelation.faction, LaunchWingmen.faction, ChangeSystemOwner.faction, ChangeShipOwners.faction, SystemInformation.SECTOR, SystemInformation.SECTOR_SYSTEM, SystemInformation.SYSTEM, SystemInformation.system, InSystemCondition.system, and ChangeSystemOwner.system.

21 
22  def getInfo(self, inf_type=False):
23  """Returns the information corresponding to the
24  given class variable."""
25  try:
26  [sec, sys] = self.system.split('/')
27  except:
28  sec = self.system
29  sys = self.system
30  if not inf_type:
31  return self.system
32  elif inf_type == self.SECTOR:
33  return sec
34  elif inf_type == self.SECTOR_SYSTEM:
35  return self.system
36  elif inf_type == self.SYSTEM:
37  return sys
38  elif inf_type == self.FACTION:
39  return self.faction
40  else:
41  raise ValueError("Invalid information type specified")

Field Documentation

int FACTION = 4
static

Definition at line 15 of file dynamic_news.py.

faction

Definition at line 19 of file dynamic_news.py.

int SECTOR = 2
static

Definition at line 13 of file dynamic_news.py.

int SECTOR_SYSTEM = 1
static

Definition at line 12 of file dynamic_news.py.

int SYSTEM = 3
static

Definition at line 14 of file dynamic_news.py.

system

Definition at line 18 of file dynamic_news.py.


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