vegastrike  0.5.1.r1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UniverseUtil Namespace Reference

Classes

class  PythonUnitIter
 

Functions

void startMenuInterface (bool firstTime, string error)
 
void playVictoryTune ()
 
int musicAddList (string str)
 
void musicLayerSkip (int layer)
 this skips the current music track, at a specific layer (and goes to the next in the currently playing list) More...
 
void musicLayerStop (int layer)
 this stops the music currently playing at a specific layer - with a nice fadeout More...
 
void musicLayerPlaySong (string str, int layer)
 
void musicLayerPlayList (int which, int layer)
 this plays msuci from a given list, at a specific layer (where the int is what was returned by musicAddList) More...
 
void musicLayerLoopList (int numloops, int layer)
 this plays msuci from a given list, at a specific layer (where the int is what was returned by musicAddList) More...
 
void musicLayerSetSoftVolume (float vol, float latency_override, int layer)
 sets the software volume, with smooth transitions (latency_override==-1 uses default transition time) More...
 
void musicLayerSetHardVolume (float vol, int layer)
 sets the hardware volume, does not support transitions of any kind. More...
 
void musicSetSoftVolume (float vol, float latency_override)
 sets the software volume, with smooth transitions (latency_override==-1 uses default transition time) More...
 
void musicSetHardVolume (float vol)
 sets the hardware volume, does not support transitions of any kind. More...
 
void musicMute (bool stopSound)
 this mutes sound - or unmutes it More...
 
void playSound (string soundName, QVector loc, Vector speed)
 
void playSoundCockpit (string soundName)
 
void StopAllSounds (void)
 
void cacheAnimation (string aniName)
 
void playAnimation (string aniName, QVector loc, float size)
 
void playAnimationGrow (string aniName, QVector loc, float size, float growpercent)
 
unsigned int getCurrentPlayer ()
 
unsigned int maxMissions ()
 
void addParticle (QVector loc, Vector velocity, Vector color, float size)
 
void loadGame (const string &savename)
 
void saveGame (const string &savename)
 
void showSplashScreen (const string &filename)
 
void showSplashMessage (const string &text)
 
void showSplashProgress (float progress)
 
void hideSplashScreen ()
 
bool isSplashScreenShowing ()
 
void sendCustom (int cp, string cmd, string args, string id)
 
std::string LookupUnitStat (const std::string &unitname, const std::string &faction, const std::string &statname)
 
Unit * GetUnitFromSerial (ObjSerial serial)
 
Unit * GetMasterPartList ()
 this gets a unit with 1 of each cargo type in it More...
 
void pushSystem (std::string name)
 this function sets the "current" system to be "name" where name may be something like "Sol/Sol" or "Crucible/Cephid_17" this function may take some time if the system has not been loaded before More...
 
bool systemInMemory (std::string name)
 
void popSystem ()
 this function restores the active system.... there must be an equal number of pushSystems ans popSystems or else Vega Strike may behave unpredictably More...
 
std::string getSystemFile ()
 This function gets the current system's official name. More...
 
std::string getSystemName ()
 this function gets the current system's nickname (not useful) More...
 
PythonUnitIter getUnitList ()
 this function gets an iterator into the units in the current system... do NOT keep an iterator across a frame–it may get deleted! More...
 
Unit * getUnit (int index)
 This function gets a unit given a number (how many iterations to go down in the iterator) More...
 
Unit * getUnitByName (std::string name)
 This function gets a unit given a name. More...
 
Unit * getUnitByPtr (void *ptr, Unit *finder=0, bool allowslowness=true)
 This function gets a unit given an unreferenceable pointer to it - much faster if finder is provided. More...
 
Unit * getScratchUnit ()
 
void setScratchUnit (Unit *)
 
void precacheUnit (std::string name, std::string faction)
 
QVector getScratchVector ()
 
void setScratchVector (QVector)
 
int getNumUnits ()
 
void cacheAnimation (std::string anim)
 
Unit * launchJumppoint (std::string name_string, std::string faction_string, std::string type_string, std::string unittype_string, std::string ai_string, int nr_of_ships, int nr_of_waves, QVector pos, std::string squadlogo, std::string destinations)
 this function launches a wormhole or a jump point. More...
 
std::string vsConfig (std::string category, std::string option, std::string def)
 
Unit * launch (std::string name_string, std::string type_string, std::string faction_string, std::string unittype, std::string ai_string, int nr_of_ships, int nr_of_waves, QVector pos, std::string sqadlogo)
 this function launches a normal fighter the name is the flightgroup name, the type is the ship type, the faction is who it belongs to, the unittype is usually "unit" unless you want to make asteroids or nebulae or jump points or planets. the aistring is either a python filename or "default" the nr of ships is the number of ships to be launched with this group, the number of waves is num reinforcements... the position is a tuple (x,y,z) where they appear and the squadlogo is a squadron image...you can leave this the empty string '' for the default squadron logo. More...
 
Cargo getRandCargo (int quantity, std::string category)
 this gets a random cargo type (useful for cargo missions) from either any category if category is '' or else from a specific category 'Contraband' comes to mind! More...
 
std::string GetAdjacentSystem (std::string str, int which)
 this gets a string which has in it a space delimited list of neighmoring systems More...
 
std::string GetGalaxyProperty (std::string sys, std::string prop)
 this gets a specific property of this system as found in universe/milky_way.xml More...
 
std::vector< std::string > GetJumpPath (std::string from, std::string to)
 get the shortest path between systems as found in universe/milky_way.xml More...
 
std::string GetGalaxyPropertyDefault (std::string sys, std::string prop, std::string def)
 this gets a specific property of this system as found in universe/milky_way.xml and returns a default value if not found More...
 
std::string GetGalaxyFaction (std::string sys)
 
void SetGalaxyFaction (std::string sys, std::string fac)
 
int GetNumAdjacentSystems (std::string sysname)
 this gets the number of systems adjacent to the sysname More...
 
float GetGameTime ()
 this gets the current game time since last start in seconds More...
 
float getStarTime ()
 this gets the current absolute startime in seconds More...
 
string getStarDate ()
 this gets the current stardate string More...
 
void SetTimeCompression ()
 this sets the time compresison value to zero More...
 
int musicAddList (std::string str)
 this adds a playlist to the music and may be triggered with an int More...
 
void musicLayerPlaySong (std::string str, int layer)
 this plays a specific song, at a specific layer More...
 
void musicPlaySong (std::string str)
 this plays a specific song, through the crossfader construct More...
 
void musicPlayList (int which)
 this plays msuci from a given list (where the int is what was returned by musicAddList) More...
 
void musicLoopList (int numloops)
 this plays msuci from a given list (where the int is what was returned by musicAddList) More...
 
void musicSkip ()
 this skips the current music track (and goes to the next in the currently playing list) More...
 
void musicStop ()
 this stops the music currently playing - with a nice fadeout More...
 
float GetDifficulty ()
 this gets the difficutly of the game... ranges between 0 and 1... many missions depend on it never going past .99 unless it's always at one. More...
 
void SetDifficulty (float diff)
 this sets the difficulty More...
 
void playSound (std::string soundName, QVector loc, Vector speed)
 this plays a sound at a location...if the sound has dual channels it will play in the center More...
 
void playSoundCockpit (std::string soundName)
 this plays a sound at full volume in the cockpit More...
 
void playAnimation (std::string aniName, QVector loc, float size)
 this plays an image (explosion or warp animation) at a location More...
 
void playAnimationGrow (std::string aniName, QVector loc, float size, float growpercent)
 
void TargetEachOther (std::string fgname, std::string faction, std::string enfgname, std::string enfaction)
 tells the respective flightgroups in this system to start shooting at each other More...
 
void StopTargettingEachOther (std::string fgname, std::string faction, std::string enfgname, std::string enfaction)
 tells the respective flightgroups in this system to stop killing each other urgently...they may still attack–just not warping and stuff More...
 
void terminateMission (bool term)
 this ends the mission with either success or failure More...
 
Unit * getPlayer ()
 this gets the player belonging to this mission More...
 
Unit * getPlayerX (int which)
 this gets a player number (if in splitscreen mode) More...
 
int getNumPlayers ()
 this gets the number of active players More...
 
void setTargetLabel (std::string label)
 
std::string getTargetLabel ()
 
float getRelationModifierInt (int which_cp, int faction)
 
float getRelationModifier (int which_cp, string faction)
 
float getFGRelationModifier (int which_cp, string fg)
 
void adjustRelationModifierInt (int which_cp, int faction, float delta)
 
void adjustRelationModifier (int which_cp, string faction, float delta)
 
void adjustFGRelationModifier (int which_cp, string fg, float delta)
 
void AdjustRelation (std::string myfaction, std::string theirfaction, float factor, float rank)
 
float GetRelation (std::string myfaction, std::string theirfaction)
 
void clearObjectives ()
 
void eraseObjective (int which)
 
int addObjective (std::string objective)
 this adds an objective for the cockpit to view ("go here and do this) More...
 
void setObjective (int which, std::string newobjective)
 this sets the objective's completeness (the int was returned by add objective) More...
 
void setCompleteness (int which, float completeNess)
 this sets the completeness of a particular objective... chanigng the color onscreen More...
 
float getCompleteness (int which)
 this gets that completeness More...
 
void setOwnerII (int which, Unit *owner)
 this sets the owner of a completeness More...
 
Unit * getOwner (int which)
 this gets an owner of a completeness (NULL means all players can see this objective) More...
 
int getMissionOwner ()
 
void setMissionOwner (int)
 
int numActiveMissions ()
 returns number missions running to tweak difficulty More...
 
void IOmessage (int delay, std::string from, std::string to, std::string message)
 this sends an IO message... I'm not sure if delay currently works, but from, to and message do :-) ... if you want to send to the bar do "bar" as the to string... if you want to make news for the news room specify "news" More...
 
Unit * GetContrabandList (std::string faction)
 this gets a unit with a faction's contraband list... may be null (check with isNull) More...
 
void SetAutoStatus (int global_auto, int player_auto)
 this sets whether or not a player may autopilot. Normally they are both 0 and the autopiloting is allowed based on if enemies are near... if you pass in 1 then autopilot will be allowed no matter who is near... if you set -1 then autopilot is never allowed. global affects all players... player just affects the player who accepted the mission. More...
 
void LoadMission (std::string missionname)
 
void LoadMissionScript (std::string scriptcontents)
 
void LoadNamedMissionScript (std::string missiontitle, std::string scriptcontents)
 
QVector SafeEntrancePoint (QVector, float radial_size=-1)
 
QVector SafeStarSystemEntrancePoint (StarSystem *sts, QVector, float radial_size=-1)
 
float getPlanetRadiusPercent ()
 
bool networked ()
 
bool isserver ()
 
void receivedCustom (int cp, bool trusted, string cmd, string args, string id)
 
std::string getVariable (std::string section, std::string name, std::string def)
 
std::string getSubVariable (std::string section, std::string subsection, std::string name, std::string def)
 
double timeofday ()
 
double sqrt (double)
 
double log (double)
 
double exp (double)
 
double cos (double)
 
double sin (double)
 
double acos (double)
 
double asin (double)
 
double atan (double)
 
double tan (double)
 
void micro_sleep (int n)
 
void ComputeGalaxySerials (std::vector< std::string > &stak)
 
void ComputeSystemSerials (std::string &systempath)
 
std::string getSaveDir ()
 
std::string getSaveInfo (const std::string &filename, bool formatForTextbox)
 
std::string getCurrentSaveGame ()
 
std::string setCurrentSaveGame (const std::string &newsave)
 
std::string getNewGameSaveName ()
 
void loadGame (const std::string &savename)
 
void saveGame (const std::string &savename)
 
void showSplashScreen (const std::string &filename)
 
void showSplashMessage (const std::string &text)
 
Unit * launchJumppoint (string name_string, string faction_string, string type_string, string unittype_string, string ai_string, int nr_of_ships, int nr_of_waves, QVector pos, string squadlogo, string destinations)
 
Cargo getRandCargo (int quantity, string category)
 
void pushSystem (string name)
 
void TargetEachOther (string fgname, string faction, string enfgname, string enfaction)
 tells the respective flightgroups in this system to start shooting at each other More...
 
void StopTargettingEachOther (string fgname, string faction, string enfgname, string enfaction)
 tells the respective flightgroups in this system to stop killing each other urgently...they may still attack–just not warping and stuff More...
 
bool systemInMemory (string nam)
 
string GetAdjacentSystem (string str, int which)
 
string GetGalaxyProperty (string sys, string prop)
 
string GetGalaxyPropertyDefault (string sys, string prop, string def)
 
string GetGalaxyFaction (string sys)
 
void SetGalaxyFaction (string sys, string fac)
 
int GetNumAdjacentSystems (string sysname)
 
int addObjective (string objective)
 
void setObjective (int which, string newobjective)
 
void IOmessage (int delay, string from, string to, string message)
 
Unit * GetContrabandList (string faction)
 
void LoadMission (string missionname)
 
void LoadNamedMissionScript (string title, string missionscript)
 
void LoadMissionScript (string missionscript)
 
Unit * launch (string name_string, string type_string, string faction_string, string unittype, string ai_string, int nr_of_ships, int nr_of_waves, QVector pos, string sqadlogo)
 
string LookupUnitStat (const string &unitname, const string &faction, const string &statname)
 
void precacheUnit (string type_string, string faction_string)
 
void securepythonstr (string &message)
 
string setCurrentSaveGame (const string &newsave)
 
vector< string > GetJumpPath (string from, string to)
 

Function Documentation

double UniverseUtil::acos ( double  x)

Definition at line 836 of file universe_util_generic.cpp.

int UniverseUtil::addObjective ( std::string  objective)

this adds an objective for the cockpit to view ("go here and do this)

int UniverseUtil::addObjective ( string  objective)

Definition at line 550 of file universe_util_generic.cpp.

void UniverseUtil::addParticle ( QVector  loc,
Vector  velocity,
Vector  color,
float  size 
)

Definition at line 135 of file universe_util.cpp.

void UniverseUtil::adjustFGRelationModifier ( int  which_cp,
string  fg,
float  delta 
)

Definition at line 405 of file universe_util_generic.cpp.

void UniverseUtil::AdjustRelation ( std::string  myfaction,
std::string  theirfaction,
float  factor,
float  rank 
)

Definition at line 355 of file universe_util_generic.cpp.

void UniverseUtil::adjustRelationModifier ( int  which_cp,
string  faction,
float  delta 
)

Definition at line 401 of file universe_util_generic.cpp.

void UniverseUtil::adjustRelationModifierInt ( int  which_cp,
int  faction,
float  delta 
)

Definition at line 391 of file universe_util_generic.cpp.

double UniverseUtil::asin ( double  x)

Definition at line 840 of file universe_util_generic.cpp.

double UniverseUtil::atan ( double  x)

Definition at line 844 of file universe_util_generic.cpp.

void UniverseUtil::cacheAnimation ( std::string  anim)
void UniverseUtil::cacheAnimation ( string  aniName)

Definition at line 114 of file universe_util.cpp.

void UniverseUtil::clearObjectives ( )

Definition at line 601 of file universe_util_generic.cpp.

void UniverseUtil::ComputeGalaxySerials ( std::vector< std::string > &  stak)

Definition at line 931 of file universe_util_generic.cpp.

void UniverseUtil::ComputeSystemSerials ( std::string &  systempath)

Definition at line 857 of file universe_util_generic.cpp.

double UniverseUtil::cos ( double  x)

Definition at line 828 of file universe_util_generic.cpp.

void UniverseUtil::eraseObjective ( int  which)

Definition at line 592 of file universe_util_generic.cpp.

double UniverseUtil::exp ( double  x)

Definition at line 824 of file universe_util_generic.cpp.

std::string UniverseUtil::GetAdjacentSystem ( std::string  str,
int  which 
)

this gets a string which has in it a space delimited list of neighmoring systems

string UniverseUtil::GetAdjacentSystem ( string  str,
int  which 
)

Definition at line 489 of file universe_util_generic.cpp.

float UniverseUtil::getCompleteness ( int  which)

this gets that completeness

Definition at line 577 of file universe_util_generic.cpp.

Unit* UniverseUtil::GetContrabandList ( std::string  faction)

this gets a unit with a faction's contraband list... may be null (check with isNull)

Unit* UniverseUtil::GetContrabandList ( string  faction)

Definition at line 639 of file universe_util_generic.cpp.

unsigned int UniverseUtil::getCurrentPlayer ( )

Definition at line 127 of file universe_util.cpp.

string UniverseUtil::getCurrentSaveGame ( )

Definition at line 1035 of file universe_util_generic.cpp.

float UniverseUtil::GetDifficulty ( )

this gets the difficutly of the game... ranges between 0 and 1... many missions depend on it never going past .99 unless it's always at one.

Definition at line 525 of file universe_util_generic.cpp.

float UniverseUtil::getFGRelationModifier ( int  which_cp,
string  fg 
)

Definition at line 384 of file universe_util_generic.cpp.

std::string UniverseUtil::GetGalaxyFaction ( std::string  sys)
string UniverseUtil::GetGalaxyFaction ( string  sys)

Definition at line 503 of file universe_util_generic.cpp.

std::string UniverseUtil::GetGalaxyProperty ( std::string  sys,
std::string  prop 
)

this gets a specific property of this system as found in universe/milky_way.xml

string UniverseUtil::GetGalaxyProperty ( string  sys,
string  prop 
)

Definition at line 493 of file universe_util_generic.cpp.

std::string UniverseUtil::GetGalaxyPropertyDefault ( std::string  sys,
std::string  prop,
std::string  def 
)

this gets a specific property of this system as found in universe/milky_way.xml and returns a default value if not found

string UniverseUtil::GetGalaxyPropertyDefault ( string  sys,
string  prop,
string  def 
)

Definition at line 497 of file universe_util_generic.cpp.

float UniverseUtil::GetGameTime ( )

this gets the current game time since last start in seconds

Definition at line 220 of file universe_util_generic.cpp.

std::vector< std::string > UniverseUtil::GetJumpPath ( std::string  from,
std::string  to 
)

get the shortest path between systems as found in universe/milky_way.xml

vector< string > UniverseUtil::GetJumpPath ( string  from,
string  to 
)

Definition at line 1051 of file universe_util_generic.cpp.

Unit * UniverseUtil::GetMasterPartList ( )

this gets a unit with 1 of each cargo type in it

Definition at line 242 of file universe_util_generic.cpp.

int UniverseUtil::getMissionOwner ( )

Definition at line 419 of file universe_util_generic.cpp.

string UniverseUtil::getNewGameSaveName ( )

Definition at line 1045 of file universe_util_generic.cpp.

int UniverseUtil::GetNumAdjacentSystems ( std::string  sysname)

this gets the number of systems adjacent to the sysname

int UniverseUtil::GetNumAdjacentSystems ( string  sysname)

Definition at line 521 of file universe_util_generic.cpp.

int UniverseUtil::getNumPlayers ( )

this gets the number of active players

Definition at line 790 of file universe_util_generic.cpp.

int UniverseUtil::getNumUnits ( )

Definition at line 464 of file universe_util_generic.cpp.

Unit * UniverseUtil::getOwner ( int  which)

this gets an owner of a completeness (NULL means all players can see this objective)

Definition at line 615 of file universe_util_generic.cpp.

float UniverseUtil::getPlanetRadiusPercent ( )

Definition at line 800 of file universe_util_generic.cpp.

Unit * UniverseUtil::getPlayer ( )

this gets the player belonging to this mission

Definition at line 752 of file universe_util_generic.cpp.

Unit * UniverseUtil::getPlayerX ( int  which)

this gets a player number (if in splitscreen mode)

Definition at line 794 of file universe_util_generic.cpp.

Cargo UniverseUtil::getRandCargo ( int  quantity,
std::string  category 
)

this gets a random cargo type (useful for cargo missions) from either any category if category is '' or else from a specific category 'Contraband' comes to mind!

Cargo UniverseUtil::getRandCargo ( int  quantity,
string  category 
)

Definition at line 191 of file universe_util_generic.cpp.

float UniverseUtil::GetRelation ( std::string  myfaction,
std::string  theirfaction 
)

Definition at line 339 of file universe_util_generic.cpp.

float UniverseUtil::getRelationModifier ( int  which_cp,
string  faction 
)

Definition at line 380 of file universe_util_generic.cpp.

float UniverseUtil::getRelationModifierInt ( int  which_cp,
int  faction 
)

Definition at line 371 of file universe_util_generic.cpp.

string UniverseUtil::getSaveDir ( )

Definition at line 943 of file universe_util_generic.cpp.

string UniverseUtil::getSaveInfo ( const std::string &  filename,
bool  formatForTextbox 
)

Definition at line 968 of file universe_util_generic.cpp.

Unit * UniverseUtil::getScratchUnit ( )

Definition at line 246 of file universe_util_generic.cpp.

QVector UniverseUtil::getScratchVector ( )

Definition at line 255 of file universe_util_generic.cpp.

string UniverseUtil::getStarDate ( )

this gets the current stardate string

Definition at line 230 of file universe_util_generic.cpp.

float UniverseUtil::getStarTime ( )

this gets the current absolute startime in seconds

Definition at line 225 of file universe_util_generic.cpp.

std::string UniverseUtil::getSubVariable ( std::string  section,
std::string  subsection,
std::string  name,
std::string  def 
)

Definition at line 808 of file universe_util_generic.cpp.

string UniverseUtil::getSystemFile ( )

This function gets the current system's official name.

Definition at line 273 of file universe_util_generic.cpp.

string UniverseUtil::getSystemName ( )

this function gets the current system's nickname (not useful)

Definition at line 279 of file universe_util_generic.cpp.

std::string UniverseUtil::getTargetLabel ( )

Definition at line 588 of file universe_util_generic.cpp.

Unit * UniverseUtil::getUnit ( int  index)

This function gets a unit given a number (how many iterations to go down in the iterator)

Definition at line 427 of file universe_util_generic.cpp.

Unit * UniverseUtil::getUnitByName ( std::string  name)

This function gets a unit given a name.

Definition at line 457 of file universe_util_generic.cpp.

Unit * UniverseUtil::getUnitByPtr ( void *  ptr,
Unit *  finder = 0,
bool  allowslowness = true 
)

This function gets a unit given an unreferenceable pointer to it - much faster if finder is provided.

Definition at line 439 of file universe_util_generic.cpp.

Unit * UniverseUtil::GetUnitFromSerial ( ObjSerial  serial)

Definition at line 133 of file universe_util_generic.cpp.

UniverseUtil::PythonUnitIter UniverseUtil::getUnitList ( )

this function gets an iterator into the units in the current system... do NOT keep an iterator across a frame–it may get deleted!

Definition at line 423 of file universe_util_generic.cpp.

std::string UniverseUtil::getVariable ( std::string  section,
std::string  name,
std::string  def 
)

Definition at line 804 of file universe_util_generic.cpp.

void UniverseUtil::hideSplashScreen ( )

Definition at line 195 of file universe_util.cpp.

void UniverseUtil::IOmessage ( int  delay,
std::string  from,
std::string  to,
std::string  message 
)

this sends an IO message... I'm not sure if delay currently works, but from, to and message do :-) ... if you want to send to the bar do "bar" as the to string... if you want to make news for the news room specify "news"

void UniverseUtil::IOmessage ( int  delay,
string  from,
string  to,
string  message 
)

Definition at line 631 of file universe_util_generic.cpp.

bool UniverseUtil::isserver ( )

Definition at line 760 of file universe_util_generic.cpp.

bool UniverseUtil::isSplashScreenShowing ( )

Definition at line 200 of file universe_util.cpp.

Unit * UniverseUtil::launch ( std::string  name_string,
std::string  type_string,
std::string  faction_string,
std::string  unittype,
std::string  ai_string,
int  nr_of_ships,
int  nr_of_waves,
QVector  pos,
std::string  sqadlogo 
)

this function launches a normal fighter the name is the flightgroup name, the type is the ship type, the faction is who it belongs to, the unittype is usually "unit" unless you want to make asteroids or nebulae or jump points or planets. the aistring is either a python filename or "default" the nr of ships is the number of ships to be launched with this group, the number of waves is num reinforcements... the position is a tuple (x,y,z) where they appear and the squadlogo is a squadron image...you can leave this the empty string '' for the default squadron logo.

Unit* UniverseUtil::launch ( string  name_string,
string  type_string,
string  faction_string,
string  unittype,
string  ai_string,
int  nr_of_ships,
int  nr_of_waves,
QVector  pos,
string  sqadlogo 
)

Definition at line 714 of file universe_util_generic.cpp.

Unit * UniverseUtil::launchJumppoint ( std::string  name_string,
std::string  faction_string,
std::string  type_string,
std::string  unittype_string,
std::string  ai_string,
int  nr_of_ships,
int  nr_of_waves,
QVector  pos,
std::string  squadlogo,
std::string  destinations 
)

this function launches a wormhole or a jump point.

this function launches a wormhole or ajump point.

Unit* UniverseUtil::launchJumppoint ( string  name_string,
string  faction_string,
string  type_string,
string  unittype_string,
string  ai_string,
int  nr_of_ships,
int  nr_of_waves,
QVector  pos,
string  squadlogo,
string  destinations 
)

Definition at line 151 of file universe_util_generic.cpp.

void UniverseUtil::loadGame ( const string &  savename)

Definition at line 143 of file universe_util.cpp.

void UniverseUtil::loadGame ( const std::string &  savename)
void UniverseUtil::LoadMission ( std::string  missionname)
void UniverseUtil::LoadMission ( string  missionname)

Definition at line 643 of file universe_util_generic.cpp.

void UniverseUtil::LoadMissionScript ( std::string  scriptcontents)
void UniverseUtil::LoadMissionScript ( string  missionscript)

Definition at line 653 of file universe_util_generic.cpp.

void UniverseUtil::LoadNamedMissionScript ( std::string  missiontitle,
std::string  scriptcontents 
)
void UniverseUtil::LoadNamedMissionScript ( string  title,
string  missionscript 
)

Definition at line 648 of file universe_util_generic.cpp.

double UniverseUtil::log ( double  x)

Definition at line 820 of file universe_util_generic.cpp.

std::string UniverseUtil::LookupUnitStat ( const std::string &  unitname,
const std::string &  faction,
const std::string &  statname 
)
string UniverseUtil::LookupUnitStat ( const string &  unitname,
const string &  faction,
const string &  statname 
)

Definition at line 737 of file universe_util_generic.cpp.

unsigned int UniverseUtil::maxMissions ( )

Definition at line 131 of file universe_util.cpp.

void UniverseUtil::micro_sleep ( int  n)

Definition at line 852 of file universe_util_generic.cpp.

int UniverseUtil::musicAddList ( string  str)

Definition at line 52 of file universe_util.cpp.

int UniverseUtil::musicAddList ( std::string  str)

this adds a playlist to the music and may be triggered with an int

void UniverseUtil::musicLayerLoopList ( int  numloops,
int  layer 
)

this plays msuci from a given list, at a specific layer (where the int is what was returned by musicAddList)

Definition at line 73 of file universe_util.cpp.

void UniverseUtil::musicLayerPlayList ( int  which,
int  layer 
)

this plays msuci from a given list, at a specific layer (where the int is what was returned by musicAddList)

Definition at line 68 of file universe_util.cpp.

void UniverseUtil::musicLayerPlaySong ( string  str,
int  layer 
)

Definition at line 64 of file universe_util.cpp.

void UniverseUtil::musicLayerPlaySong ( std::string  str,
int  layer 
)

this plays a specific song, at a specific layer

void UniverseUtil::musicLayerSetHardVolume ( float  vol,
int  layer 
)

sets the hardware volume, does not support transitions of any kind.

Definition at line 81 of file universe_util.cpp.

void UniverseUtil::musicLayerSetSoftVolume ( float  vol,
float  latency_override,
int  layer 
)

sets the software volume, with smooth transitions (latency_override==-1 uses default transition time)

Definition at line 77 of file universe_util.cpp.

void UniverseUtil::musicLayerSkip ( int  layer)

this skips the current music track, at a specific layer (and goes to the next in the currently playing list)

Definition at line 56 of file universe_util.cpp.

void UniverseUtil::musicLayerStop ( int  layer)

this stops the music currently playing at a specific layer - with a nice fadeout

Definition at line 60 of file universe_util.cpp.

void UniverseUtil::musicLoopList ( int  numloops)
inline

this plays msuci from a given list (where the int is what was returned by musicAddList)

Definition at line 207 of file universe_util.h.

void UniverseUtil::musicMute ( bool  stopSound)

this mutes sound - or unmutes it

Definition at line 93 of file universe_util.cpp.

void UniverseUtil::musicPlayList ( int  which)
inline

this plays msuci from a given list (where the int is what was returned by musicAddList)

Definition at line 201 of file universe_util.h.

void UniverseUtil::musicPlaySong ( std::string  str)
inline

this plays a specific song, through the crossfader construct

this plays a specific song

Definition at line 195 of file universe_util.h.

void UniverseUtil::musicSetHardVolume ( float  vol)

sets the hardware volume, does not support transitions of any kind.

Definition at line 89 of file universe_util.cpp.

void UniverseUtil::musicSetSoftVolume ( float  vol,
float  latency_override 
)

sets the software volume, with smooth transitions (latency_override==-1 uses default transition time)

Definition at line 85 of file universe_util.cpp.

void UniverseUtil::musicSkip ( )
inline

this skips the current music track (and goes to the next in the currently playing list)

Definition at line 213 of file universe_util.h.

void UniverseUtil::musicStop ( )
inline

this stops the music currently playing - with a nice fadeout

Definition at line 219 of file universe_util.h.

bool UniverseUtil::networked ( )

Definition at line 756 of file universe_util_generic.cpp.

int UniverseUtil::numActiveMissions ( )

returns number missions running to tweak difficulty

Definition at line 622 of file universe_util_generic.cpp.

void UniverseUtil::playAnimation ( string  aniName,
QVector  loc,
float  size 
)

Definition at line 119 of file universe_util.cpp.

void UniverseUtil::playAnimation ( std::string  aniName,
QVector  loc,
float  size 
)

this plays an image (explosion or warp animation) at a location

void UniverseUtil::playAnimationGrow ( string  aniName,
QVector  loc,
float  size,
float  growpercent 
)

Definition at line 123 of file universe_util.cpp.

void UniverseUtil::playAnimationGrow ( std::string  aniName,
QVector  loc,
float  size,
float  growpercent 
)
void UniverseUtil::playSound ( string  soundName,
QVector  loc,
Vector  speed 
)

Definition at line 97 of file universe_util.cpp.

void UniverseUtil::playSound ( std::string  soundName,
QVector  loc,
Vector  speed 
)

this plays a sound at a location...if the sound has dual channels it will play in the center

void UniverseUtil::playSoundCockpit ( string  soundName)

Definition at line 104 of file universe_util.cpp.

void UniverseUtil::playSoundCockpit ( std::string  soundName)

this plays a sound at full volume in the cockpit

void UniverseUtil::playVictoryTune ( )

Definition at line 48 of file universe_util.cpp.

void UniverseUtil::popSystem ( )

this function restores the active system.... there must be an equal number of pushSystems ans popSystems or else Vega Strike may behave unpredictably

Definition at line 269 of file universe_util_generic.cpp.

void UniverseUtil::precacheUnit ( std::string  name,
std::string  faction 
)
void UniverseUtil::precacheUnit ( string  type_string,
string  faction_string 
)

Definition at line 748 of file universe_util_generic.cpp.

void UniverseUtil::pushSystem ( std::string  name)

this function sets the "current" system to be "name" where name may be something like "Sol/Sol" or "Crucible/Cephid_17" this function may take some time if the system has not been loaded before

void UniverseUtil::pushSystem ( string  name)

Definition at line 264 of file universe_util_generic.cpp.

void UniverseUtil::receivedCustom ( int  cp,
bool  trusted,
string  cmd,
string  args,
string  id 
)

Definition at line 771 of file universe_util_generic.cpp.

QVector UniverseUtil::SafeEntrancePoint ( QVector  pos,
float  radial_size = -1 
)

Definition at line 710 of file universe_util_generic.cpp.

QVector UniverseUtil::SafeStarSystemEntrancePoint ( StarSystem sts,
QVector  pos,
float  radial_size = -1 
)

Definition at line 673 of file universe_util_generic.cpp.

void UniverseUtil::saveGame ( const string &  savename)

Definition at line 159 of file universe_util.cpp.

void UniverseUtil::saveGame ( const std::string &  savename)
void UniverseUtil::securepythonstr ( string &  message)

Definition at line 764 of file universe_util_generic.cpp.

void UniverseUtil::sendCustom ( int  cp,
string  cmd,
string  args,
string  id 
)

Definition at line 205 of file universe_util.cpp.

void UniverseUtil::SetAutoStatus ( int  global_auto,
int  player_auto 
)

this sets whether or not a player may autopilot. Normally they are both 0 and the autopiloting is allowed based on if enemies are near... if you pass in 1 then autopilot will be allowed no matter who is near... if you set -1 then autopilot is never allowed. global affects all players... player just affects the player who accepted the mission.

Definition at line 658 of file universe_util_generic.cpp.

void UniverseUtil::setCompleteness ( int  which,
float  completeNess 
)

this sets the completeness of a particular objective... chanigng the color onscreen

Definition at line 568 of file universe_util_generic.cpp.

std::string UniverseUtil::setCurrentSaveGame ( const std::string &  newsave)
string UniverseUtil::setCurrentSaveGame ( const string &  newsave)

Definition at line 1040 of file universe_util_generic.cpp.

void UniverseUtil::SetDifficulty ( float  diff)

this sets the difficulty

Definition at line 529 of file universe_util_generic.cpp.

void UniverseUtil::SetGalaxyFaction ( std::string  sys,
std::string  fac 
)
void UniverseUtil::SetGalaxyFaction ( string  sys,
string  fac 
)

Definition at line 512 of file universe_util_generic.cpp.

void UniverseUtil::setMissionOwner ( int  whichplayer)

Definition at line 415 of file universe_util_generic.cpp.

void UniverseUtil::setObjective ( int  which,
std::string  newobjective 
)

this sets the objective's completeness (the int was returned by add objective)

void UniverseUtil::setObjective ( int  which,
string  newobjective 
)

Definition at line 559 of file universe_util_generic.cpp.

void UniverseUtil::setOwnerII ( int  which,
Unit *  owner 
)

this sets the owner of a completeness

Definition at line 610 of file universe_util_generic.cpp.

void UniverseUtil::setScratchUnit ( Unit *  un)

Definition at line 250 of file universe_util_generic.cpp.

void UniverseUtil::setScratchVector ( QVector  un)

Definition at line 259 of file universe_util_generic.cpp.

void UniverseUtil::setTargetLabel ( std::string  label)

Definition at line 584 of file universe_util_generic.cpp.

void UniverseUtil::SetTimeCompression ( )

this sets the time compresison value to zero

this gets the current game time since last start in seconds

this gets the current absolute startime in seconds this sets the time compresison value to zero

Definition at line 235 of file universe_util_generic.cpp.

void UniverseUtil::showSplashMessage ( const string &  text)

Definition at line 185 of file universe_util.cpp.

void UniverseUtil::showSplashMessage ( const std::string &  text)
void UniverseUtil::showSplashProgress ( float  progress)

Definition at line 190 of file universe_util.cpp.

void UniverseUtil::showSplashScreen ( const string &  filename)

Definition at line 169 of file universe_util.cpp.

void UniverseUtil::showSplashScreen ( const std::string &  filename)
double UniverseUtil::sin ( double  x)

Definition at line 832 of file universe_util_generic.cpp.

double UniverseUtil::sqrt ( double  x)

Definition at line 816 of file universe_util_generic.cpp.

void UniverseUtil::startMenuInterface ( bool  firstTime,
string  error = string() 
)

Definition at line 246 of file gamemenu.cpp.

void UniverseUtil::StopAllSounds ( void  )

Definition at line 110 of file universe_util.cpp.

void UniverseUtil::StopTargettingEachOther ( std::string  fgname,
std::string  faction,
std::string  enfgname,
std::string  enfaction 
)

tells the respective flightgroups in this system to stop killing each other urgently...they may still attack–just not warping and stuff

void UniverseUtil::StopTargettingEachOther ( string  fgname,
string  faction,
string  enfgname,
string  enfaction 
)

tells the respective flightgroups in this system to stop killing each other urgently...they may still attack–just not warping and stuff

Definition at line 312 of file universe_util_generic.cpp.

bool UniverseUtil::systemInMemory ( std::string  name)
bool UniverseUtil::systemInMemory ( string  nam)

Definition at line 330 of file universe_util_generic.cpp.

double UniverseUtil::tan ( double  x)

Definition at line 848 of file universe_util_generic.cpp.

void UniverseUtil::TargetEachOther ( std::string  fgname,
std::string  faction,
std::string  enfgname,
std::string  enfaction 
)

tells the respective flightgroups in this system to start shooting at each other

void UniverseUtil::TargetEachOther ( string  fgname,
string  faction,
string  enfgname,
string  enfaction 
)

tells the respective flightgroups in this system to start shooting at each other

Definition at line 285 of file universe_util_generic.cpp.

void UniverseUtil::terminateMission ( bool  term)

this ends the mission with either success or failure

Definition at line 534 of file universe_util_generic.cpp.

double UniverseUtil::timeofday ( )

Definition at line 812 of file universe_util_generic.cpp.

std::string UniverseUtil::vsConfig ( std::string  category,
std::string  option,
std::string  def 
)

Definition at line 146 of file universe_util_generic.cpp.