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

Data Structures

class  PlayerMissionInfo
 
class  missionhook
 

Functions

def addPlayer
 
def getMissionPlayer
 
def setMissionPlayer
 
def unsetMissionPlayer
 
def mission_lib_custom
 
def SetMissionHookArgs
 
def AddMissionHooks
 
def SetLastMission
 
def LoadLastMission
 
def RemoveLastMission
 
def AddActiveMissionEntry
 
def RemoveActiveMissionEntry
 
def CountMissions
 
def BriefLastMission
 
def AddNewMission
 
def GetMissionList
 
def Jumplist
 
def MakePlunder
 
def MakeContraband
 
def CreateRandomMission
 
def CreateFixerMissions
 
def PickRandomMission
 Unused code – has old briefings if (searchMissionNameStr("patrol")): last_briefing[0][which] = 'Confed needs the help of mercs and hunters to keep our air space clean. More...
 
def CreateGuildMissions
 

Variables

list players = []
 
int global_plr = -1
 

Detailed Description

This moduleprovides functions for creating, storing and activating
campaign, guild, and fixer missions.

Function Documentation

def mission_lib.AddActiveMissionEntry (   entry)

Definition at line 200 of file mission_lib.py.

References getMissionPlayer(), and hmac.update().

201 def AddActiveMissionEntry(entry):
202  plr = getMissionPlayer()
203  active_missions = players[plr].active_missions
204  active_missions_nextid = players[plr].active_missions_nextid
205 
206  active_missions.append(entry)
207  active_missions[-1].update([('ENTRY_ID',active_missions_nextid)])
208  active_missions_nextid += 1
209  return active_missions_nextid-1
def mission_lib.AddMissionHooks (   director)

Definition at line 96 of file mission_lib.py.

References debug.debug, and getMissionPlayer().

96 
97 def AddMissionHooks(director):
98  hookargs = players[getMissionPlayer()].hookargs
99  doMissionHooks=True
100  try:
101  if hasattr(director,'aborted'):
102  if getattr(director,'aborted'):
103  doMissionHooks=False
104  except:
105  import sys
106  debug.debug(sys.exc_info()[0])
107  debug.debug(sys.exc_info()[1])
108  debug.debug("CARGO MISSION ABORTING done")
109  if doMissionHooks:
110  director.mission_hooks___ = missionhook(hookargs)
def mission_lib.AddNewMission (   which,
  args,
  constructor = None,
  briefing0 = '',
  briefing1 = '',
  vars0 = None,
  vars1 = None 
)
Adds a mission to the list of missions stored in playerInfo. 

Definition at line 281 of file mission_lib.py.

References addPlayer(), getMissionPlayer(), custom.run(), and locale.str().

282 def AddNewMission(which,args,constructor=None,briefing0='',briefing1='',vars0=None,vars1=None):
283  """ Adds a mission to the list of missions stored in playerInfo. """
284  if not isinstance(vars0,dict):
285  vars0 = dict()
286  vars1 = vars0
287  if VS.isserver():
288  lenvars0=len(vars0)
289  sendargs = ["AddNewMission", which, briefing0, briefing1,lenvars0]
290  for key in vars0:
291  sendargs.append(key)
292  sendargs.append(vars0[key])
293  custom.run("mission_lib", sendargs, None)
294 
295  plr = getMissionPlayer()
296  addPlayer(plr, False)
297  playerInfo = players[plr]
298 
299  which = str(which)
300  playerInfo.last_constructor[which] = constructor
301  playerInfo.last_args[which] = args
302  playerInfo.last_briefing[0][which] = briefing0
303  playerInfo.last_briefing[1][which] = briefing1
304  playerInfo.last_briefing_vars[0][which] = vars0
305  playerInfo.last_briefing_vars[1][which] = vars1
def mission_lib.addPlayer (   num,
  reset = True 
)

Definition at line 36 of file mission_lib.py.

36 
37 def addPlayer(num, reset=True):
38  while len(players)<=num:
39  players.append(PlayerMissionInfo())
40  if reset:
41  players[num] = PlayerMissionInfo()
42 
43 addPlayer(VS.getNumPlayers()-1)
44 
# addPlayer(0) #single player -- add 0th player.
def mission_lib.BriefLastMission (   whichid,
  first,
  textbox = None,
  template = '#DESCRIPTION#' 
)
Outputs the briefing from fixer missions on the base screen. 

Definition at line 225 of file mission_lib.py.

References CountMissions(), getMissionPlayer(), dumbdbm.keys(), SetLastMission(), dospath.split(), locale.str(), and debug.warn.

226 def BriefLastMission(whichid,first,textbox=None,template='#DESCRIPTION#'):
227  """ Outputs the briefing from fixer missions on the base screen. """
228  plr = getMissionPlayer()
229  last_briefing = players[plr].last_briefing
230  last_briefing_vars = players[plr].last_briefing_vars
231 
232  # Compare the given mission id with the id stored in the briefing vars
233  # If match is found, retrieve the mission name, which is also the mission key
234  which = None
235  for name in last_briefing_vars[0]:
236  if last_briefing_vars[0][name]['MISSION_ID'] == str(whichid):
237  which = name
238  # Should not happen anymore, but sometimes missions have all the same id,
239  # e.g. 1, and then no missions for id 0 will e found.
240  if which == None:
241  which = last_briefing_vars[0].keys()[0]
242  debug.warn("mission_lib.BriefLastMission couldn't find mission id"+ str(whichid))
243 
244  if first<0 or first>=len(last_briefing):
245  return
246  if (which in last_briefing[first]):
247  # compute variables
248  s_which = str(which).split('/')
249  w_prefix = ''
250  curmission = s_which[len(s_which)-1]
251  if curmission.isdigit():
252  # But for numeric identifiers, convert base-0 to base-1 indices
253  curmission = str(int(curmission)+1)
254  else:
255  # allow non-numeric mission identifiers ( 'Disc_1', anyone? )
256  currmission = str(whichid)
257  for i in s_which[:len(s_which)-1]:
258  w_prefix += str(i) + '/'
259  nummissions = CountMissions(first,w_prefix)
260 
261  # replace variables in template
262  template = template.replace('#MISSION_NUMBER#',str(curmission))
263  template = template.replace('#MISSION_ID#',str(whichid))
264  template = template.replace('#GUILD_NAME#',s_which[0])
265  template = template.replace('#NUM_MISSIONS#',str(nummissions))
266  template = template.replace('#DESCRIPTION#',str(last_briefing[first][which]))
267  template = template.replace('#SHORT_DESCRIPTION#',str(last_briefing_vars[first][which]['MISSION_SHORTDESC']))
268  try:
269  template = template.replace('#MISSION_TYPE#',last_briefing_vars[first][which]['MISSION_TYPE'])
270  except:
271  template = template.replace('#MISSION_TYPE#','')
272 
273  # set text
274  import Base
275  if textbox:
276  Base.SetTextBoxText(Base.GetCurRoom(),textbox, template)
277  else:
278  Base.Message (template)
279  # Remember this mission as the last one being processed.
280  SetLastMission(which)
def mission_lib.CountMissions (   first,
  prefix 
)

Definition at line 215 of file mission_lib.py.

References getMissionPlayer(), and locale.str().

216 def CountMissions(first,prefix):
217  plr = getMissionPlayer()
218  last_briefing = players[plr].last_briefing
219 
220  nummissions = 0
221  for which in last_briefing[first]:
222  if str(which).startswith(prefix):
223  nummissions = nummissions + 1
224  return nummissions
def mission_lib.CreateFixerMissions ( )
This function creates missions with ids "0" and "1" for use with the fixers
on bases.

Definition at line 416 of file mission_lib.py.

References CreateRandomMission(), and vsrandom.random().

417 def CreateFixerMissions():
418  """ This function creates missions with ids "0" and "1" for use with the fixers
419  on bases.
420  """
421  rndnum = vsrandom.random()
422  fixers = []
423  if rndnum<0.7:
424  f = CreateRandomMission(0)
425  fixers.append(f)
426  img = None
427  if f:
428  img = f[0]
429  rndnum = vsrandom.random()
430  if rndnum<0.6:
431  i = 0
432  newimg = img
433  while newimg==img and i<10:
434  f = CreateRandomMission(1)
435  if f:
436  newimg = f[0]
437  i += 1
438  if i<10:
439  fixers.append(f)
440  return fixers
def mission_lib.CreateGuildMissions (   guildname,
  nummissions,
  accepttypes,
  prefix = "#G#",
  acceptmsg = '' 
)

Definition at line 475 of file mission_lib.py.

References AddNewMission(), addPlayer(), CountMissions(), PickleTools.decodeMap(), getMissionPlayer(), PickRandomMission(), and locale.str().

476 def CreateGuildMissions(guildname,nummissions,accepttypes,prefix="#G#",acceptmsg=''):
477  plr=getMissionPlayer()
478  addPlayer(plr, False)
479 
480  goodlist=[]
481  for indx in range(Director.getSaveStringLength(plr, "mission_scripts")):
482  script=Director.getSaveString(plr,"mission_scripts",indx)
483  if (script.find(prefix)!=-1):
484  missiontype=script[3:script.find('#',3)]
485  freq = 0
486  if (accepttypes==None):
487  freq = 1
488  elif (missiontype in accepttypes):
489  freq = accepttypes[missiontype]
490  elif ('*' in accepttypes):
491  freq = accepttypes['*']
492  if freq:
493  goodlist.append( (indx,freq) )
494  if len(goodlist)<nummissions:
495  nummissions=len(goodlist)
496  delit=[]
497  for missionnum in range(0,nummissions):
498  goodi=PickRandomMission(goodlist)
499  if goodi == None:
500  break
501  i=goodlist[goodi][0]
502  which=guildname+'/'+str(missionnum)
503  script=Director.getSaveString(plr,"mission_scripts",i)
504  desc=Director.getSaveString(plr,"mission_descriptions",i)
505  vars=PickleTools.decodeMap( Director.getSaveString(plr,"mission_vars",i) )
506  vars.setdefault('MISSION_SHORTDESC',Director.getSaveString(plr,"mission_names",i))
507  delit.append(i)
508  AddNewMission(which,script,None,desc,acceptmsg,vars,vars)
509  goodlist.pop(goodi)
510  delit.sort()
511  delit.reverse()
512  for i in delit:
513  Director.eraseSaveString(plr,"mission_scripts",i)
514  Director.eraseSaveString(plr,"mission_descriptions",i)
515  Director.eraseSaveString(plr,"mission_names",i)
516  Director.eraseSaveString(plr,"mission_vars",i)
517  #more reliable... sometimes we run out of good missions,
518  #sometimes we have preexistent missions (!)
519  return CountMissions(0,guildname)
def mission_lib.CreateRandomMission (   whichnum)
This function gets a random mission and saves the information in
an array as the which element. Returns the sprite file and text.

Definition at line 368 of file mission_lib.py.

References AddNewMission(), PickleTools.decodeMap(), getMissionPlayer(), MakeContraband(), MakePlunder(), vsrandom.random(), vsrandom.randrange(), dospath.split(), and locale.str().

369 def CreateRandomMission(whichnum):
370  """ This function gets a random mission and saves the information in
371  an array as the which element. Returns the sprite file and text."""
372  which = str(whichnum)
373  missiontype = vsrandom.random();
374  fac = VS.GetGalaxyFaction(VS.getSystemFile())
375  if fac=="pirates":
376  if (missiontype>.5):
377  return None
378  missiontype*=.2;
379  elif (VS.GetRelation(fac,"pirates")<-.8 and missiontype<.1):
380  missiontype = 0.1 + 0.9 * missiontype
381  plr = getMissionPlayer()
382  if (missiontype<.05):
383  return MakePlunder(which)
384  elif (missiontype<.1):
385  return MakeContraband(which)
386  else:
387  goodlist = []
388  for indx in range(Director.getSaveStringLength(plr, "mission_scripts")):
389  script=Director.getSaveString(plr,"mission_scripts",indx)
390  if script.find("#F#")!=-1:
391  goodlist.append(indx)
392  goodlist.sort()
393  goodlist.reverse()
394  if len(goodlist):
395  i = goodlist[vsrandom.randrange(len(goodlist))]
396  script = Director.getSaveString(plr,"mission_scripts",i)
397  desc = Director.getSaveString(plr,"mission_descriptions",i)
398  vars = PickleTools.decodeMap( Director.getSaveString(plr,"mission_vars",i) )
399  vars.setdefault('MISSION_SHORTDESC',Director.getSaveString(plr, "mission_names",i))
400  Director.eraseSaveString(plr,"misson_scripts",i)
401  Director.eraseSaveString(plr,"misson_descriptions",i)
402  Director.eraseSaveString(plr,"misson_names",i)
403  Director.eraseSaveString(plr,"misson_vars",i)
404  mylist = script.split("#") ###Skip the first two because first is always '' and second is always 'F'
405  try:
406  vars['MISSION_ID'] = vars['MISSION_ID']
407  except:
408  vars['MISSION_ID'] = which
409  description = vars['MISSION_SHORTDESC'].split("/")[1]
410  vars['MISSION_NAME'] = description
411  AddNewMission(description,script,None,desc,mylist[4],vars,vars)
412  return (mylist[2], mylist[3], which, description)
413  else:
414  # It should only get here if no fixer missions were found
415  return None # Fixer code will generate a NoFixer hopefully.
def mission_lib.GetMissionList (   activelist = True)
Returns a list of missions that were already generated.
With the activelist parameter, one can filter the active or
all missions.

Definition at line 306 of file mission_lib.py.

References getMissionPlayer().

307 def GetMissionList(activelist=True):
308  """ Returns a list of missions that were already generated.
309  With the activelist parameter, one can filter the active or
310  all missions.
311  """
312  plr = getMissionPlayer()
313  active_missions = players[plr].active_missions
314  last_briefing_vars = players[plr].last_briefing_vars
315  last_briefing = players[plr].last_briefing
316 
317  if activelist:
318  return active_missions
319  else:
320  return list( dict( list(last_briefing_vars[0][index].iteritems())+
321  [('DESCRIPTION',last_briefing[0][index]),
322  ('ACCEPT_MESSAGE',last_briefing[1][index]),
323  ('MISSION_NAME',index)] )
324  for index in last_briefing[0] )
def mission_lib.getMissionPlayer ( )

Definition at line 47 of file mission_lib.py.

47 
48 def getMissionPlayer():
49  # Will allow to hardcode a player number in certain cases.
50  if global_plr >= 0:
51  return global_plr
52  else:
53  return VS.getCurrentPlayer()
def mission_lib.Jumplist (   jumps)

Definition at line 325 of file mission_lib.py.

References dospath.split().

326 def Jumplist (jumps):
327  if not len(jumps):
328  return 'Your destination is this system.'
329  str="First of all, you will need to fly to the %s jumppoint. "%jumps[0].split('/')[-1]
330  for j in jumps[1:]:
331  str+="Then jump in the %s jumppoint. "%j.split('/')[-1]
332  return str
def mission_lib.LoadLastMission (   which = None)
Makes a mission an active mission. 

Definition at line 115 of file mission_lib.py.

References debug.debug, debug.error, webbrowser.get(), getMissionPlayer(), RemoveLastMission(), custom.run(), and locale.str().

116 def LoadLastMission(which=None):
117  """ Makes a mission an active mission. """
118  print "#given mission argument: ", which
119  plr = getMissionPlayer()
120  if which is None:
121  which = str(players[plr].lastMission)
122  print "#loading mission: ", which
123  if VS.networked():
124  custom.run('mission_lib', ['LoadLastMission',which], None)
125  return
126 
127  last_constructor = players[plr].last_constructor
128  last_args = players[plr].last_args
129  last_briefing_vars = players[plr].last_briefing_vars
130  last_briefing = players[plr].last_briefing
131  ret = True
132  if which in last_constructor and which in last_args:
133  if last_constructor[which]==None:
134  if type(last_args[which])==str:
135  script = "%(args)s"
136  else:
137  script = "%(args)r()"
138  vars = dict(args=last_args[which])
139  else:
140  script = '''#
141 import %(constructor)s
142 temp=%(constructor)s.%(constructor)s%(args)s
143 mission_lib.AddMissionHooks(temp)
144 temp=0
145 '''
146  cons=last_constructor[which]
147  if type(cons)!=str:
148  cons=cons.__name__
149  if type(last_args[which])==str:
150  args = last_args[which]
151  else:
152  args = repr(last_args[which])
153  vars = dict(constructor=cons,args=args)
154  script = script % vars
155  if script[:1] == '#':
156  prescript = '''#
157 import mission_lib
158 mission_lib.SetMissionHookArgs(%(amentry)r)
159 %(postscript)s'''
160  amentry = last_briefing_vars[0].get(which,dict())
161  try:
162  amentry.update(last_briefing_vars[1].get(which,dict()).iteritems())
163  amentry.update([
164  #('MISSION_NAME',which),
165  ('DESCRIPTION',last_briefing[0].get(which,'')),
166  ('ACCEPT_MESSAGE',last_briefing[1].get(which,''))
167  ])
168  except:
169  debug.error("TRACING BACK")
170  import sys
171  debug.error(sys.exc_info()[0])
172  debug.error(sys.exc_info()[1])
173  debug.error("BACKTRACE done")
174  ret = False
175  vars = dict(amentry=amentry,postscript=script)
176  script = prescript % vars
177  debug.debug("Loading mission:\n%s" % script)
178  VS.LoadNamedMissionScript(which, script)
179  else:
180  debug.debug('No last mission with name "'+str(which)+'"')
181  ret = False
182  RemoveLastMission(which)
183  return ret
def mission_lib.MakeContraband (   which)

Definition at line 349 of file mission_lib.py.

References AddNewMission(), universe.getAdjacentSystems(), Jumplist(), vsrandom.randrange(), and locale.str().

350 def MakeContraband(which):
351  constructor = cargo_mission.cargo_mission
352  numsys=vsrandom.randrange(2,5)
353  jumps=universe.getAdjacentSystems(VS.getSystemFile(),numsys)[1]
354  diff=vsrandom.randrange(0,3)
355  creds=numsys*2500+diff*800
356  args = ('pirates', 0, 6, diff,creds, 1, 1200, 'Contraband',jumps)
357  briefing0 = 'We need some...*cough*... cargo delivered to some of our pirates in a nearby system: '+ Jumplist(jumps)+ ' It\'d be preferable if ye kept the ole po\' off yo back durin the run. Will ya do it for '+str(creds)+' creds?'
358  briefing1 = 'Thanks pal; keep it on the d&l if you know my meanin.'
359  vars = { 'MISSION_TYPE' : 'CONTRABAND',
360  'MISSION_SHORTDESC' : 'Deliver contraband to %s for %s' % (Jumplist(jumps),creds) }
361  try:
362  vars['MISSION_ID'] = vars['MISSION_ID']
363  except:
364  vars['MISSION_ID'] = which
365  description = vars['MISSION_SHORTDESC']
366  AddNewMission(description,args,constructor,briefing0,briefing1,vars,vars)
367  return ("bases/fixers/pirate.spr","Talk with the Pirate",which)
def mission_lib.MakePlunder (   which)

Definition at line 333 of file mission_lib.py.

References AddNewMission(), vsrandom.randrange(), and locale.str().

334 def MakePlunder(which):
335  constructor = plunder.plunder
336  creds=vsrandom.randrange(15,25)*1000
337  args = (creds,'pirates',5,'Contraband',1)
338  briefing0 = 'Arr Matey. We have a target in this system that needs a lil roughin up. We need you to bag a merchant and deliver her cargo into our hands. It\'s worth '+str(creds)+ ' to us. Up to you, ya space pirate.'
339  briefing1 = 'Ahoy! We\'ll be lookin for that cargo mighty soon!'
340  vars = { 'MISSION_TYPE' : 'PIRACY',
341  'MISSION_SHORTDESC' : 'Plunder merchant target for %s' % creds }
342  try:
343  vars['MISSION_ID'] = vars['MISSION_ID']
344  except:
345  vars['MISSION_ID'] = which
346  description = vars['MISSION_SHORTDESC']
347  AddNewMission(description,args,constructor,briefing0,briefing1,vars,vars)
348  return ("bases/fixers/pirate.spr","Talk with the Pirate",which)
def mission_lib.mission_lib_custom (   local,
  cmd,
  args,
  id 
)

Definition at line 60 of file mission_lib.py.

References custom.add(), AddNewMission(), CreateFixerMissions(), and LoadLastMission().

60 
61 def mission_lib_custom(local, cmd, args, id):
62  if args[0] == 'AddNewMission':
63  which = args[1]
64  brief0 = args[2]
65  brief1 = args[3]
66  num_briefing_vars = int(args[4])
67  briefing_vars = {}
68  for i in range(num_briefing_vars):
69  briefing_vars[args[i*2+5]] = args[i*2+6]
70  AddNewMission(which, None, None, brief0, brief1, briefing_vars, briefing_vars)
71  elif args[0] == 'LoadLastMission':
72  which = args[1]
73  LoadLastMission(which)
74  elif args[0] == 'CreateFixerMissions':
75  ret = CreateFixerMissions()
76  vals = [0]
77  for m in ret:
78  if isinstance(m,tuple):
79  vals += m
80  vals[0] += 1
81  return vals
def mission_lib.PickRandomMission (   goodlist)

Unused code – has old briefings if (searchMissionNameStr("patrol")): last_briefing[0][which] = 'Confed needs the help of mercs and hunters to keep our air space clean.

There are increasing reports of pirate and alien activity in these sectors and we need your sensor data. '+Jumplist(jumps) +' Will you do the patrol in said system for '+str(creds)+' credits?' if (searchMissionNameStr("cargo")): last_briefing[0][which] = 'Our business needs you to run some legit goods to a base a few systems away. '+ Jumplist(jumps) + ' This is worth '+str(creds)+' to us.' if (diff>=2): last_briefing[0][which]+=' However, you cannot fail us! There are consequences for your actions in this universe.' if (searchMissionNameStr("bounty")): last_briefing[0][which] = 'We need you to hit a nearby target. '+Jumplist(jumps)+' Our reward is '+str(creds)+' will you do it?' if (searchMissionNameStr("defend")): last_briefing[0][which] = 'We need help to secure a nearby strategic point in this system. Eliminate all enemies there. We offer '+str(encred)+' per enemy. Will you do it?' if (base): last_briefing[0][which] = 'One of our capitol vessels is under attack in this system! We call to the aid of all bounty hunters to defend it. Our reward is '+str(encred)+' per enemy craft destroyed. Will you help us?'

Definition at line 455 of file mission_lib.py.

References vsrandom.randrange().

456 def PickRandomMission(goodlist):
457  bounds = 0
458  for mis in goodlist:
459  bounds = bounds + mis[1]
460  if bounds:
461  pos = vsrandom.randrange(bounds)
462  for midx in range(len(goodlist)):
463  if pos>=goodlist[midx][1]:
464  pos = pos - goodlist[midx][1]
465  else:
466  return midx
467  return len(goodlist)-1
468  else:
469  return None
470 
471 # accepttypes is a dictionary that takes mission types as keys, and has
472 # mission frequencies (likelihood of appearing) as values. A special key
473 # is the asterisk ('*'), which is a wildcard key that applies to any other
474 # key. If a mission's type cannot find a matching key (the wildcard matches
# all), then it will have frequency 0 (meaning, it will be disallowed).
def mission_lib.RemoveActiveMissionEntry (   entry_id)

Definition at line 210 of file mission_lib.py.

References fnmatch.filter(), and getMissionPlayer().

211 def RemoveActiveMissionEntry(entry_id):
212  plr = getMissionPlayer()
213  players[plr].active_missions = filter(lambda x:x.get('ENTRY_ID',None)!=entry_id,
214  players[plr].active_missions)
def mission_lib.RemoveLastMission (   which = None)

Definition at line 184 of file mission_lib.py.

References getMissionPlayer().

185 def RemoveLastMission(which=None):
186  plr = getMissionPlayer()
187  if which is None:
188  which=players[plr].lastMission
189 
190  last_constructor = players[plr].last_constructor
191  last_args = players[plr].last_args
192  last_briefing_vars = players[plr].last_briefing_vars
193  last_briefing = players[plr].last_briefing
194  for container in ( last_args,last_constructor,
195  last_briefing[0],last_briefing[1],
196  last_briefing_vars[0],last_briefing_vars[1] ):
197  if which in container:
198  del container[which]
199  players[plr].lastMission=None
def mission_lib.SetLastMission (   which)

Definition at line 111 of file mission_lib.py.

References debug.debug, getMissionPlayer(), and locale.str().

112 def SetLastMission(which):
113  players[getMissionPlayer()].lastMission = str(which)
114  debug.debug('set last mission to "'+str(which)+'"')
def mission_lib.SetMissionHookArgs (   args)

Definition at line 93 of file mission_lib.py.

References getMissionPlayer().

93 
94 def SetMissionHookArgs(args):
95  players[getMissionPlayer()].hookargs = args
def mission_lib.setMissionPlayer (   plr = -1)

Definition at line 54 of file mission_lib.py.

54 
55 def setMissionPlayer(plr=-1):
56  global global_plr
global_plr = plr
def mission_lib.unsetMissionPlayer ( )

Definition at line 57 of file mission_lib.py.

References setMissionPlayer().

57 
58 def unsetMissionPlayer():

Variable Documentation

int global_plr = -1

Definition at line 45 of file mission_lib.py.

list players = []

Definition at line 20 of file mission_lib.py.