Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <math.h>
#include <sys/stat.h>
#include "lin_time.h"
#include "cmd/script/mission.h"
#include "universe_util.h"
#include "universe_generic.h"
#include "cmd/unit_generic.h"
#include "cmd/unit_factory.h"
#include "cmd/collection.h"
#include "star_system_generic.h"
#include <string>
#include <set>
#include "savegame.h"
#include "save_util.h"
#include "cmd/unit_csv.h"
#include "gfx/cockpit_generic.h"
#include "load_mission.h"
#include "configxml.h"
#include "vs_globals.h"
#include "vsfilesystem.h"
#include "cmd/unit_util.h"
#include "networking/netserver.h"
#include "cmd/csv.h"
#include "linecollide.h"
#include "cmd/unit_collide.h"
#include "cmd/unit_find.h"
#include "python/init.h"
#include "cs_python.h"
#include "options.h"
Go to the source code of this file.
Namespaces | |
UniverseUtil | |
Constant Groups | |
UniverseUtil | |
Macros | |
#define | activeSys _Universe->activeStarSystem() |
#define | DEFAULT_FACTION_SAVENAME "FactionTookOver_" |
Functions | |
Unit & | GetUnitMasterPartList () |
int | num_delayed_missions () |
Unit * | UniverseUtil::GetUnitFromSerial (ObjSerial serial) |
std::string | UniverseUtil::vsConfig (std::string category, std::string option, std::string def) |
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) |
Cargo | UniverseUtil::getRandCargo (int quantity, string category) |
float | UniverseUtil::GetGameTime () |
this gets the current game time since last start in seconds More... | |
float | UniverseUtil::getStarTime () |
this gets the current absolute startime in seconds More... | |
string | UniverseUtil::getStarDate () |
this gets the current stardate string More... | |
void | UniverseUtil::SetTimeCompression () |
this sets the time compresison value to zero More... | |
Unit * | UniverseUtil::GetMasterPartList () |
this gets a unit with 1 of each cargo type in it More... | |
Unit * | UniverseUtil::getScratchUnit () |
void | UniverseUtil::setScratchUnit (Unit *) |
QVector | UniverseUtil::getScratchVector () |
void | UniverseUtil::setScratchVector (QVector) |
void | UniverseUtil::pushSystem (string name) |
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 More... | |
std::string | UniverseUtil::getSystemFile () |
This function gets the current system's official name. More... | |
std::string | UniverseUtil::getSystemName () |
this function gets the current system's nickname (not useful) More... | |
void | UniverseUtil::TargetEachOther (string fgname, string faction, string enfgname, string enfaction) |
tells the respective flightgroups in this system to start shooting at each other More... | |
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 More... | |
bool | UniverseUtil::systemInMemory (string nam) |
float | UniverseUtil::GetRelation (std::string myfaction, std::string theirfaction) |
void | UniverseUtil::AdjustRelation (std::string myfaction, std::string theirfaction, float factor, float rank) |
float | UniverseUtil::getRelationModifierInt (int which_cp, int faction) |
float | UniverseUtil::getRelationModifier (int which_cp, string faction) |
float | UniverseUtil::getFGRelationModifier (int which_cp, string fg) |
void | UniverseUtil::adjustRelationModifierInt (int which_cp, int faction, float delta) |
void | UniverseUtil::adjustRelationModifier (int which_cp, string faction, float delta) |
void | UniverseUtil::adjustFGRelationModifier (int which_cp, string fg, float delta) |
void | UniverseUtil::setMissionOwner (int) |
int | UniverseUtil::getMissionOwner () |
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! More... | |
Unit * | UniverseUtil::getUnit (int index) |
This function gets a unit given a number (how many iterations to go down in the iterator) More... | |
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. More... | |
Unit * | UniverseUtil::getUnitByName (std::string name) |
This function gets a unit given a name. More... | |
int | UniverseUtil::getNumUnits () |
string | UniverseUtil::GetAdjacentSystem (string str, int which) |
string | UniverseUtil::GetGalaxyProperty (string sys, string prop) |
string | UniverseUtil::GetGalaxyPropertyDefault (string sys, string prop, string def) |
string | UniverseUtil::GetGalaxyFaction (string sys) |
void | UniverseUtil::SetGalaxyFaction (string sys, string fac) |
int | UniverseUtil::GetNumAdjacentSystems (string sysname) |
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. More... | |
void | UniverseUtil::SetDifficulty (float diff) |
this sets the difficulty More... | |
void | UniverseUtil::playVictoryTune () |
void | UniverseUtil::terminateMission (bool term) |
this ends the mission with either success or failure More... | |
static string | UniverseUtil::dontBlankOut (string objective) |
int | UniverseUtil::addObjective (string objective) |
void | UniverseUtil::setObjective (int which, string newobjective) |
void | UniverseUtil::setCompleteness (int which, float completeNess) |
this sets the completeness of a particular objective... chanigng the color onscreen More... | |
float | UniverseUtil::getCompleteness (int which) |
this gets that completeness More... | |
void | UniverseUtil::setTargetLabel (std::string label) |
std::string | UniverseUtil::getTargetLabel () |
void | UniverseUtil::eraseObjective (int which) |
void | UniverseUtil::clearObjectives () |
void | UniverseUtil::setOwnerII (int which, Unit *owner) |
this sets the owner of a completeness More... | |
Unit * | UniverseUtil::getOwner (int which) |
this gets an owner of a completeness (NULL means all players can see this objective) More... | |
int | UniverseUtil::numActiveMissions () |
returns number missions running to tweak difficulty More... | |
void | UniverseUtil::IOmessage (int delay, string from, string to, string message) |
Unit * | UniverseUtil::GetContrabandList (string faction) |
void | UniverseUtil::LoadMission (string missionname) |
void | UniverseUtil::LoadNamedMissionScript (string title, string missionscript) |
void | UniverseUtil::LoadMissionScript (string missionscript) |
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. More... | |
QVector | UniverseUtil::SafeStarSystemEntrancePoint (StarSystem *sts, QVector, float radial_size=-1) |
QVector | UniverseUtil::SafeEntrancePoint (QVector, float radial_size=-1) |
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) |
string | UniverseUtil::LookupUnitStat (const string &unitname, const string &faction, const string &statname) |
void | UniverseUtil::precacheUnit (string type_string, string faction_string) |
Unit * | UniverseUtil::getPlayer () |
this gets the player belonging to this mission More... | |
bool | UniverseUtil::networked () |
bool | UniverseUtil::isserver () |
void | UniverseUtil::securepythonstr (string &message) |
void | UniverseUtil::receivedCustom (int cp, bool trusted, string cmd, string args, string id) |
int | UniverseUtil::getNumPlayers () |
this gets the number of active players More... | |
Unit * | UniverseUtil::getPlayerX (int which) |
this gets a player number (if in splitscreen mode) More... | |
float | UniverseUtil::getPlanetRadiusPercent () |
std::string | UniverseUtil::getVariable (std::string section, std::string name, std::string def) |
std::string | UniverseUtil::getSubVariable (std::string section, std::string subsection, std::string name, std::string def) |
double | UniverseUtil::timeofday () |
double | UniverseUtil::sqrt (double) |
double | UniverseUtil::log (double) |
double | UniverseUtil::exp (double) |
double | UniverseUtil::cos (double) |
double | UniverseUtil::sin (double) |
double | UniverseUtil::acos (double) |
double | UniverseUtil::asin (double) |
double | UniverseUtil::atan (double) |
double | UniverseUtil::tan (double) |
void | UniverseUtil::micro_sleep (int n) |
void | UniverseUtil::ComputeSystemSerials (std::string &systempath) |
void | UniverseUtil::ComputeGalaxySerials (std::vector< std::string > &stak) |
std::string | UniverseUtil::getSaveDir () |
static std::string | UniverseUtil::simplePrettySystem (std::string system) |
static std::string | UniverseUtil::simplePrettyShip (std::string ship) |
std::string | UniverseUtil::getSaveInfo (const std::string &filename, bool formatForTextbox) |
std::string | UniverseUtil::getCurrentSaveGame () |
string | UniverseUtil::setCurrentSaveGame (const string &newsave) |
std::string | UniverseUtil::getNewGameSaveName () |
vector< string > | UniverseUtil::GetJumpPath (string from, string to) |
Variables | |
vs_options | game_options |
needed for assert() calls. More... | |
static UnitContainer | UniverseUtil::scratch_unit |
static QVector | UniverseUtil::scratch_vector |
static std::vector< Unit * > | UniverseUtil::cachedUnits |
#define activeSys _Universe->activeStarSystem() |
Definition at line 41 of file universe_util_generic.cpp.
Referenced by UniverseUtil::getNumUnits(), UniverseUtil::getSystemFile(), UniverseUtil::getSystemName(), UniverseUtil::getUnit(), UniverseUtil::getUnitByName(), UniverseUtil::getUnitByPtr(), and UniverseUtil::getUnitList().
#define DEFAULT_FACTION_SAVENAME "FactionTookOver_" |
Definition at line 501 of file universe_util_generic.cpp.
Referenced by UniverseUtil::GetGalaxyFaction(), and UniverseUtil::SetGalaxyFaction().
Unit& GetUnitMasterPartList | ( | ) |
Definition at line 8366 of file unit_generic.cpp.
References UnitFactory::getMasterPartList().
int num_delayed_missions | ( | ) |
Definition at line 67 of file load_mission.cpp.
References _Universe, Universe::CurrentCockpit(), delayed_missions, and i.
Referenced by UniverseUtil::numActiveMissions().
vs_options game_options |