Vega strike Python Modules doc
0.5.1
Documentation of the " Modules " folder of Vega strike
|
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 |
This moduleprovides functions for creating, storing and activating campaign, guild, and fixer missions.
def mission_lib.AddActiveMissionEntry | ( | entry) |
def mission_lib.AddMissionHooks | ( | director) |
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().
def mission_lib.addPlayer | ( | num, | |
reset = True |
|||
) |
Definition at line 36 of file mission_lib.py.
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.
def mission_lib.CountMissions | ( | first, | |
prefix | |||
) |
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().
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().
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().
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().
def mission_lib.getMissionPlayer | ( | ) |
Definition at line 47 of file mission_lib.py.
def mission_lib.Jumplist | ( | jumps) |
Definition at line 325 of file mission_lib.py.
References dospath.split().
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().
def mission_lib.MakeContraband | ( | which) |
Definition at line 349 of file mission_lib.py.
References AddNewMission(), universe.getAdjacentSystems(), Jumplist(), vsrandom.randrange(), and locale.str().
def mission_lib.MakePlunder | ( | which) |
Definition at line 333 of file mission_lib.py.
References AddNewMission(), vsrandom.randrange(), and locale.str().
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().
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().
def mission_lib.RemoveActiveMissionEntry | ( | entry_id) |
def mission_lib.RemoveLastMission | ( | which = None ) |
def mission_lib.SetLastMission | ( | which) |
Definition at line 111 of file mission_lib.py.
References debug.debug, getMissionPlayer(), and locale.str().
def mission_lib.SetMissionHookArgs | ( | args) |
Definition at line 93 of file mission_lib.py.
References getMissionPlayer().
def mission_lib.setMissionPlayer | ( | plr = -1 ) |
Definition at line 54 of file mission_lib.py.
def mission_lib.unsetMissionPlayer | ( | ) |
Definition at line 57 of file mission_lib.py.
References setMissionPlayer().
int global_plr = -1 |
Definition at line 45 of file mission_lib.py.
list players = [] |
Definition at line 20 of file mission_lib.py.