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

Public Member Functions

def recoverShipTypes
 
def genShipTypes
 
def putShipTypes
 
def Respawn
 
def SpawnShips
 
def SpawnShip
 
def makeAdversary
 
def ReName
 
def ReTarget
 
def __init__
 
def Intro
 
def Begin
 
def doWin
 
def doLose
 
def NothingHere
 
def Execute
 
- Public Member Functions inherited from quest
def NoSignificantsNear
 
def SignificantsNear
 
def setOwner
 
def removeQuest
 
def makeQuestPersistent
 
def isPersistent
 
def Execute
 

Data Fields

 names
 
 adv
 
 cname
 
 tname
 
 faction
 
 num
 
 winglist
 
 respawn
 
 won
 
 norep
 
 begin
 
 enfaction
 
 ennum
 
- Data Fields inherited from quest
 name
 
 playernum
 

Detailed Description

Definition at line 10 of file quest_isowing.py.

Constructor & Destructor Documentation

def __init__ (   self,
  faction,
  num,
  enfaction,
  ennum 
)

Definition at line 80 of file quest_isowing.py.

80 
81  def __init__ (self,faction,num,enfaction,ennum):
82  self.faction = faction
83  self.num = num
84  self.winglist=[]
85  self.adv=[]
86  self.cname=0
87  self.tname=0
88  self.respawn=0
89  self.won=0
90  self.norep=0
91  self.begin=0
92  self.enfaction=enfaction
self.ennum = ennum

Member Function Documentation

def Begin (   self)

Definition at line 103 of file quest_isowing.py.

References TrafficAI.begin, quest_isowing.begin, rescue.enfaction, quest_isowing.enfaction, quest_isowing.ennum, patrol_enemies.faction, rescue.faction, SystemInformation.faction, ambush.faction, plunder.faction, bounty.faction, escort_mission.faction, defend.faction, ShipTracker.faction, escort_local.faction, cargo_mission.faction, quest_isowing.faction, go_to_adjacent_systems.faction, Launch.faction, ClearFactionRecord.faction, PushRelation.faction, PopRelation.faction, LaunchWingmen.faction, ChangeSystemOwner.faction, ChangeShipOwners.faction, quest_isowing.genShipTypes(), quest_isowing.Intro(), quest.isPersistent(), quest_isowing.makeAdversary(), quest_isowing.names, quest_blockade.names, FileHandler.names, quest_isowing.num, Launch.num, CargoSpaceCondition.num, AtMostActiveMissionsCondition.num, AtLeastActiveMissionsCondition.num, LaunchWingmen.num, quest_isowing.putShipTypes(), quest_isowing.recoverShipTypes(), defend.respawn, escort_local.respawn, quest_isowing.respawn, quest_isowing.SpawnShips(), and quest_isowing.won.

104  def Begin(self):
105  self.begin=1
106  self.respawn=0
107  if (self.isPersistent()):
108  self.won=1
109  self.names = self.recoverShipTypes ()
110  VS.IOmessage (0,"game","all","Establishing link communication.")
111  VS.IOmessage (0,"game","all","[%s Wing] We're back at your service." % self.faction)
112  else:
113  VS.SetAutoStatus (0,-1)
114  self.names = self.genShipTypes (self.num)
115  self.makeAdversary(self.enfaction,self.ennum)
116  self.Intro()
117  #vsrandom.randrange (1,self.num+1))
118  self.SpawnShips ()
119  self.putShipTypes(self.names)
def doLose (   self)

Definition at line 131 of file quest_isowing.py.

References rescue.enfaction, quest_isowing.enfaction, patrol_enemies.faction, rescue.faction, SystemInformation.faction, ambush.faction, plunder.faction, escort_mission.faction, bounty.faction, defend.faction, ShipTracker.faction, escort_local.faction, cargo_mission.faction, quest_isowing.faction, go_to_adjacent_systems.faction, Launch.faction, ClearFactionRecord.faction, PushRelation.faction, PopRelation.faction, LaunchWingmen.faction, ChangeSystemOwner.faction, ChangeShipOwners.faction, quest.removeQuest(), and quest_isowing.won.

132  def doLose(self):
133  VS.SetAutoStatus (0,0)
134  self.removeQuest()
135  VS.IOmessage (0,"game","all","Terrorists eliminated! Looks like we have another success to report for %s."%self.enfaction)
136  VS.IOmessage (0,"game","news",'TERRORIST CELL DESTROYED Recently a %s wing was eliminated by %s special forces. "After learning of a recent assembly by these millitants, we had to move at once!" said SubCommander Ret in a recent interview with GNN, "It is good to see such justice served on our frontiers!" Hopefully this will reduce the recent rash of violence in the frontier sectors of our society!'%(self.faction,self.enfaction))
137  if (self.won==0):
138  VS.SetAutoStatus (0,0)
def doWin (   self)

Definition at line 120 of file quest_isowing.py.

References rescue.enfaction, quest_isowing.enfaction, patrol_enemies.faction, rescue.faction, SystemInformation.faction, ambush.faction, plunder.faction, escort_mission.faction, bounty.faction, defend.faction, ShipTracker.faction, escort_local.faction, cargo_mission.faction, quest_isowing.faction, go_to_adjacent_systems.faction, Launch.faction, ClearFactionRecord.faction, PushRelation.faction, PopRelation.faction, LaunchWingmen.faction, ChangeSystemOwner.faction, ChangeShipOwners.faction, quest.makeQuestPersistent(), quest_isowing.NothingHere(), and quest_isowing.won.

121  def doWin(self):
122  self.won=1
123  if (self.NothingHere()):
124  return
125  VS.SetAutoStatus (0,0)
126  self.makeQuestPersistent()
127  VS.IOmessage (0,"game","all","Thank you for saving us!")
128  VS.IOmessage (0,"game","all","We owe our lives to you...")
129  VS.IOmessage (0,"game","all","So therefore we will go with you and follow your orders where they may take us")
130  VS.IOmessage (0,"game","all","Together we can succeed!")
VS.IOmessage (0,"game","news",'TERRORIST FLIGHTGROUP ESCAPES Recently a long sought for %s wing confronted and destroyed %s special forces. "After learning of a recent assembly by these millitants, we had to move at once; it is sad that these militants preemtively struck our forces before retreating like cowards!" said SubCommander Ret in a recent interview with GNN, "We need to warn our citizens of the presence of roaming %s starships...Any sighting of these starships must be reported to %s authorities immediately." Will such slips in confed security cause further problems in the frontier, or will they finally meet their end after a deadly manhunt? The future remains to be seen. The SubCommanders parting words were: "But See to it I will, I can promise you that!"'%(self.faction,self.enfaction,self.faction,self.enfaction))
def Execute (   self)

Definition at line 145 of file quest_isowing.py.

References quest_isowing.adv, TrafficAI.begin, quest_isowing.begin, quest_isowing.Begin(), quest_isowing.doLose(), quest_isowing.doWin(), quest_isowing.norep, quest_isowing.NothingHere(), quest_isowing.ReName(), quest_isowing.Respawn(), defend.respawn, escort_local.respawn, quest_isowing.respawn, quest_isowing.ReTarget(), quest_isowing.winglist, and quest_isowing.won.

146  def Execute (self):
147  playa=VS.getPlayer()
148  if (playa.isNull()):
149  if (self.won==1):
150  self.respawn=1
151  return 1
152  if (self.begin==0):
153  self.Begin()
154  if (self.respawn):
155  self.respawn=0
156  self.Respawn()
157  if (len (self.winglist)==0):
158  VS.SetAutoStatus (0,0)
159  return 0
160  if (len (self.adv)==0):
161  if (self.won==0):
162  self.doWin()
163  else:
164  self.ReTarget()
165  self.norep+=1
166  if (self.norep>100):
167  self.ReName()
168  self.norep=0
169  if (self.NothingHere()):
170  self.doLose()
171  return 0
172  return 1
def genShipTypes (   self,
  num 
)

Definition at line 13 of file quest_isowing.py.

References patrol_enemies.faction, rescue.faction, SystemInformation.faction, ambush.faction, plunder.faction, escort_mission.faction, bounty.faction, defend.faction, ShipTracker.faction, escort_local.faction, cargo_mission.faction, quest_isowing.faction, go_to_adjacent_systems.faction, Launch.faction, ClearFactionRecord.faction, PushRelation.faction, PopRelation.faction, LaunchWingmen.faction, ChangeSystemOwner.faction, and ChangeShipOwners.faction.

13 
14  def genShipTypes (self,num):
15  namelist= []
16  for i in range (num):
17  namelist+= [faction_ships.getRandomFighter (self.faction)]
return namelist
def Intro (   self)

Definition at line 93 of file quest_isowing.py.

References rescue.enfaction, quest_isowing.enfaction, patrol_enemies.faction, rescue.faction, SystemInformation.faction, ambush.faction, plunder.faction, escort_mission.faction, bounty.faction, defend.faction, ShipTracker.faction, escort_local.faction, cargo_mission.faction, quest_isowing.faction, go_to_adjacent_systems.faction, Launch.faction, ClearFactionRecord.faction, PushRelation.faction, PopRelation.faction, LaunchWingmen.faction, ChangeSystemOwner.faction, and ChangeShipOwners.faction.

93 
94  def Intro(self):
95  VS.IOmessage (0,"game","all","[%s Enforcers] Under edict 502419 We hereby command"%self.enfaction)
96  VS.IOmessage (0,"game","all","[%s Enforcers] All %s terrorists to power down and prepare to be boarded."%(self.enfaction,self.faction))
97  VS.IOmessage (3,"game","all","[%s Enforcers] You are in violation of anti-terrorist laws."%self.enfaction)
98  VS.IOmessage (4,"game","all","[%s Enforcers] And are conspiring against the legitimate Star Confederacy."%self.enfaction)
99  VS.IOmessage (5,"game","all","[%s Wing] We have nothing to do with your alleged terrorists"%self.faction)
100  VS.IOmessage (5,"game","all","[%s Wing] and are only exercising our freedom of assembly."%self.faction)
101  VS.IOmessage (8,"game","all","[%s Wing] This is a %s wing requesting assistance from any nearby craft! We are being arrested unfairly!"% (self.faction,self.faction))
102  VS.IOmessage (8,"game","all","[%s Wing] Should anyone honor our request for help we would be severely in debt!"% self.faction)
def makeAdversary (   self,
  faction,
  num 
)

Definition at line 46 of file quest_isowing.py.

46 
47  def makeAdversary (self,faction,num):
48  self.adv=[]
49  playa = VS.getPlayer()
50  if (playa):
51  for i in range (num):
52  self.adv+=[launch.launch_wave_around_unit("Shadow",
53  faction,
55  "default",
56  1,
57  playa.rSize()+500,
58  playa.rSize()+2000,
59  playa,
"")]
def NothingHere (   self)

Definition at line 139 of file quest_isowing.py.

References quest_isowing.winglist.

140  def NothingHere(self):
141  for i in self.winglist:
142  if (i):
143  return 0
144  return 1
def putShipTypes (   self,
  names 
)

Definition at line 18 of file quest_isowing.py.

References patrol_enemies.faction, rescue.faction, SystemInformation.faction, ambush.faction, plunder.faction, escort_mission.faction, bounty.faction, defend.faction, ShipTracker.faction, escort_local.faction, cargo_mission.faction, quest_isowing.faction, go_to_adjacent_systems.faction, Launch.faction, ClearFactionRecord.faction, PushRelation.faction, PopRelation.faction, LaunchWingmen.faction, ChangeSystemOwner.faction, ChangeShipOwners.faction, quest.playernum, and save_util.saveStringList().

18 
19  def putShipTypes (self,names):
save_util.saveStringList(self.playernum,"%s_wingships"%self.faction,names);
def recoverShipTypes (   self)

Definition at line 11 of file quest_isowing.py.

References patrol_enemies.faction, rescue.faction, SystemInformation.faction, ambush.faction, plunder.faction, escort_mission.faction, bounty.faction, defend.faction, ShipTracker.faction, escort_local.faction, cargo_mission.faction, quest_isowing.faction, go_to_adjacent_systems.faction, Launch.faction, ClearFactionRecord.faction, PushRelation.faction, PopRelation.faction, LaunchWingmen.faction, ChangeSystemOwner.faction, ChangeShipOwners.faction, and quest.playernum.

11 
12  def recoverShipTypes (self):
return save_util.loadStringList (self.playernum,"%s_wingships"%self.faction);
def ReName (   self)

Definition at line 60 of file quest_isowing.py.

References quest_isowing.cname, and quest_isowing.winglist.

60 
61  def ReName (self):
62  if (self.cname >= len (self.winglist)):
63  self.cname=0
64  else:
65  if (not self.winglist[self.cname]):
66  if (self.names[self.cname]!=''):
67  self.names[self.cname]=''
68  self.putShipTypes(self.names)
self.cname+=1
def Respawn (   self)

Definition at line 20 of file quest_isowing.py.

References quest_isowing.winglist.

20 
21  def Respawn (self):
22  for n in self.winglist:
23  if (n):
24  n.Kill()
25  self.names = self.recoverShipTypes ()
self.SpawnShips ()
def ReTarget (   self)

Definition at line 69 of file quest_isowing.py.

References quest_isowing.adv, and quest_isowing.tname.

69 
70  def ReTarget (self):
71  if (self.tname >=len (self.adv)):
72  self.tname=0
73  else:
74  ship = self.winglist[self.tname % len (self.winglist) ]
75  if (self.adv[self.tname]):
76  if (ship):
77  self.adv[self.tname].SetTarget (ship)
78  self.tname +=1
79  else:
del self.adv[self.tname]
def SpawnShip (   self,
  playa,
  name 
)

Definition at line 34 of file quest_isowing.py.

References patrol_enemies.faction, rescue.faction, SystemInformation.faction, ambush.faction, plunder.faction, escort_mission.faction, bounty.faction, defend.faction, ShipTracker.faction, escort_local.faction, cargo_mission.faction, quest_isowing.faction, go_to_adjacent_systems.faction, Launch.faction, ClearFactionRecord.faction, PushRelation.faction, PopRelation.faction, LaunchWingmen.faction, ChangeSystemOwner.faction, ChangeShipOwners.faction, and launch.launch_wave_around_unit().

34 
35  def SpawnShip (self,playa,name):
36  un=launch.launch_wave_around_unit(playa.getFlightgroupName(),
37  playa.getFactionName(),
38  name,
39  "default",
40  1,
41  playa.rSize()+100,
42  playa.rSize()+1000,
43  playa,
44  "")
45  un.setFactionName(self.faction)
return un
def SpawnShips (   self)

Definition at line 26 of file quest_isowing.py.

References quest_isowing.names, quest_blockade.names, FileHandler.names, quest_isowing.SpawnShip(), and quest_isowing.winglist.

26 
27  def SpawnShips (self):
28  print "spawning"
29  print self.names
30  playa = VS.getPlayer()
31  if (playa):
32  for n in self.names:
33  if (len (n)>0):
self.winglist+=[self.SpawnShip (playa,n)]

Field Documentation

adv

Definition at line 47 of file quest_isowing.py.

begin

Definition at line 90 of file quest_isowing.py.

cname

Definition at line 62 of file quest_isowing.py.

enfaction

Definition at line 91 of file quest_isowing.py.

ennum

Definition at line 92 of file quest_isowing.py.

faction

Definition at line 81 of file quest_isowing.py.

names

Definition at line 24 of file quest_isowing.py.

norep

Definition at line 89 of file quest_isowing.py.

num

Definition at line 82 of file quest_isowing.py.

respawn

Definition at line 87 of file quest_isowing.py.

tname

Definition at line 71 of file quest_isowing.py.

winglist

Definition at line 83 of file quest_isowing.py.

won

Definition at line 88 of file quest_isowing.py.


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