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

Data Structures

class  PlayerInfo
 

Functions

def getTargetShipInfo
 
def Execute
 

Variables

 plr = None
 

Function Documentation

def client.Execute ( )

Definition at line 26 of file client.py.

References getTargetShipInfo().

26 
27 def Execute():
28  global plr
29  if not VS.networked():
30  return
31  if not plr:
32  plr = PlayerInfo()
33  if VS.getPlayer() != plr.myUnit:
34  plr = PlayerInfo()
35  if not plr.myUnit:
36  return
37  if plr.myUnit.GetTarget() != plr.myTarget:
38  plr.myTarget = plr.myUnit.GetTarget()
39  print 'plr.myUnit.GetTarget() changed!'
41 
def client.getTargetShipInfo (   plr)

Definition at line 12 of file client.py.

References dospath.join(), and custom.run().

12 
13 def getTargetShipInfo(plr):
14  print 'running getTargetShipInfo'
15  newTarget = plr.myTarget
16  fg = newTarget.getFlightgroupName()
17  def targetResponse(args):
18  plr.sendingShipinfoRequest=False;
19  if (newTarget == plr.myUnit.GetTarget()):
20  VS.setTargetLabel('\n'.join(args))
21  else: # Our target changed... try again:
23  if fg and fg!='Base' and not plr.sendingShipinfoRequest:
24  custom.run("shipinfo",[fg],targetResponse)
25  plr.sendingShipinfoRequest=True

Variable Documentation

plr = None

Definition at line 10 of file client.py.