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

Public Member Functions

def __init__
 
def Execute
 
- Public Member Functions inherited from quest
def NoSignificantsNear
 
def SignificantsNear
 
def setOwner
 
def removeQuest
 
def makeQuestPersistent
 
def isPersistent
 
def Execute
 

Data Fields

 player
 
 stage
 
 timer
 
 msgColor
 
 system
 
 shipyard
 
 playernum
 
 name
 
- Data Fields inherited from quest
 name
 
 playernum
 

Detailed Description

Definition at line 27 of file quest_shipyardbomb.py.

Constructor & Destructor Documentation

def __init__ (   self)

Definition at line 29 of file quest_shipyardbomb.py.

29 
30  def __init__ (self):
31  self.player = VS.getPlayer()
32  self.stage = 1
33  self.timer = VS.GetGameTime()
34  self.msgColor = ("#FF9999","#FF99FF")
35  self.system = VS.getSystemName()
36  self.shipyard = unit.getUnitByName('Shipyard')

Member Function Documentation

def Execute (   self)

Definition at line 41 of file quest_shipyardbomb.py.

References unit.getUnitFullName(), quest_shipyardbomb.msgColor, quest_blockade.msgColor, quest_debug.msgColor, quest_shipyardbomb.player, quest_dispute.player, quest_blockade.player, quest_debug.player, news.publishNews(), quest_shipyardbomb.shipyard, quest_rlaan_spy.stage, quest_drone.stage, quest_rogue_militia.stage, quest_racene.stage, quest_shipyardbomb.stage, quest_dispute.stage, quest_blockade.stage, quest_debug.stage, locale.str(), SystemInformation.system, quest_shipyardbomb.system, quest_blockade.system, InSystemCondition.system, ChangeSystemOwner.system, quest_disappear.timer, ambush.timer, waitjump.timer, quest_explore.timer, ai_escortpatrol.timer, quest_shipyardbomb.timer, quest_dispute.timer, quest_blockade.timer, ambush_scan.timer, quest_debug.timer, and Profile.timer.

41 
42  def Execute (self):
43  if (VS.getSystemName()==self.system and self.player and self.shipyard):
44  if (self.stage==1 and VS.GetGameTime()>=self.timer):
45  if (self.shipyard.getSignificantDistance(self.player) > 20000):
46  print 'shipy ret'
47  print "distance" + str(self.shipyard.getSignificantDistance(self.player))
48  return 1
49  else:
50  print 'killing'
51  pos = self.shipyard.Position()
52  size = 10*self.shipyard.rSize()
53  VS.playAnimation("explosion_orange.ani",pos,size)
54  pos = (pos[0]+.5*size,pos[1],pos[2])
55  VS.playAnimation("explosion_orange.ani",pos,size)
56  pos = (pos[0]-size,pos[1],pos[2])
57  VS.playAnimation("explosion_orange.ani",pos,size)
58  VS.playSound("explosion.wav",pos,(1,0,0))
59  self.shipyard.DealDamageToHull ((10,0,0),self.shipyard.GetHull()*.9)
60  self.timer = VS.GetGameTime()+10
61  self.stage = 2
62  if (self.stage==2 and VS.GetGameTime()>=self.timer):
63  VS.IOmessage(0,unit.getUnitFullName(self.shipyard),"all",self.msgColor[0]+"Large Explosion detected... standby...%#@*")
64  text = "NAVAL SHIPYARDS HIT BY BOMB\\\Disaster struck the Confederate Naval Shipyards orbiting Alpha Centauri hours ago, when a powerful explosive device detonated, crippling a fleet carrier that was nearing completion. "
65  text += "At least a dozen casualties were reported with an unknown number of injured, and salvage crews are still working hard to clear the area of wreckage. "
66  text += "A team from the CSP (Confederate Security Police) arrived at the shipyards mere hours after the incident, and an investigation has been launched to determine who the perpetrators of this attack were, whether they were human terrorists or agents of an alien power."
67  news.publishNews(text)
68  self.stage = 99
69  if (self.stage==99 and not VS.getSystemName()==self.system):
70  self.stage += 1 # don't enter this loop anymore
71  self.playernum = -1
72  self.name = "quest_shipyardbomb"
73  self.removeQuest()
74  return 0
75  return 1

Field Documentation

msgColor

Definition at line 33 of file quest_shipyardbomb.py.

name

Definition at line 71 of file quest_shipyardbomb.py.

player

Definition at line 30 of file quest_shipyardbomb.py.

playernum

Definition at line 70 of file quest_shipyardbomb.py.

shipyard

Definition at line 35 of file quest_shipyardbomb.py.

stage

Definition at line 31 of file quest_shipyardbomb.py.

system

Definition at line 34 of file quest_shipyardbomb.py.

timer

Definition at line 32 of file quest_shipyardbomb.py.


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