![]() |
OpenXcom
1.0
Open-source clone of the original X-Com
|
Public Member Functions | |
RuleMissionScript (const std::string &type) | |
Creates a new mission script. More... | |
~RuleMissionScript () | |
Deletes a mission script. More... | |
void | load (const YAML::Node &node) |
Loads a mission script from yaml. More... | |
std::string | getType () const |
Gets the name of the script command. More... | |
std::string | getVarName () const |
Gets the name of the variable to use for keeping track of... things. More... | |
std::set< std::string > | getAllMissionTypes () const |
Gets a complete and unique list of all the mission types contained within this command. More... | |
std::vector< std::string > | getRegions (const int month) const |
Gets a list of the regions in this command's region weights for a given month. More... | |
std::vector< std::string > | getMissionTypes (const int month) const |
Gets a list of the mission types in this command's mission weights for a given month. More... | |
int | getFirstMonth () const |
Gets the first month this command will run. More... | |
int | getLastMonth () const |
Gets the last month this command will run. More... | |
int | getLabel () const |
Gets the label of this command, used for conditionals. More... | |
int | getExecutionOdds () const |
Gets the odds of this command executing. More... | |
int | getTargetBaseOdds () const |
Gets the odds of this mission targetting an xcom base. More... | |
int | getMinDifficulty () const |
Gets the minimum difficulty for this command to run. More... | |
int | getMaxRuns () const |
Gets the maximum number of times to run a command with this varName. More... | |
int | getRepeatAvoidance () const |
Gets how many previous mission sites to keep track of (to avoid using them again) More... | |
int | getDelay () const |
Gets the number of minutes to delay spawning of the first wave of this mission, overrides the spawn delay defined in the mission waves. More... | |
const std::vector< int > & | getConditionals () const |
Gets the list of conditions this command requires in order to run. More... | |
bool | hasRaceWeights () const |
Does this command have raceWeights? More... | |
bool | hasMissionWeights () const |
Does this command have mission weights? More... | |
bool | hasRegionWeights () const |
Does this command have region weights? More... | |
const std::map< std::string, bool > & | getResearchTriggers () const |
Gets the research triggers that may apply to this command. More... | |
bool | getUseTable () const |
Delete this mission from the table? stops it coming up again in random selection, but NOT if a missionScript calls it by name. More... | |
void | setSiteType (const bool siteType) |
Sets this script to a terror mission type command or not. More... | |
bool | getSiteType () const |
Checks if this is a terror-type mission or not. More... | |
std::string | generate (const size_t monthsPassed, const GenerationType type) const |
Generates either a region, a mission, or a race based on the month. More... | |
OpenXcom::RuleMissionScript::RuleMissionScript | ( | const std::string & | type | ) |
Creates a new mission script.
RuleMissionScript: the rules for the alien mission progression.
Each script element is independant, and the saved game will probe the list of these each month to determine what's going to happen.
OpenXcom::RuleMissionScript::~RuleMissionScript | ( | ) |
Deletes a mission script.
Destructor, cleans up the mess we left in ram.
std::string OpenXcom::RuleMissionScript::generate | ( | const size_t | monthsPassed, |
const GenerationType | type | ||
) | const |
Generates either a region, a mission, or a race based on the month.
Chooses one of the available races, regions, or missions for this command.
monthsPassed | The number of months that have passed in the game world. |
type | the type of thing we want to generate, region, mission or race. |
std::set< std::string > OpenXcom::RuleMissionScript::getAllMissionTypes | ( | ) | const |
Gets a complete and unique list of all the mission types contained within this command.
const std::vector< int > & OpenXcom::RuleMissionScript::getConditionals | ( | ) | const |
Gets the list of conditions this command requires in order to run.
int OpenXcom::RuleMissionScript::getDelay | ( | ) | const |
Gets the number of minutes to delay spawning of the first wave of this mission, overrides the spawn delay defined in the mission waves.
int OpenXcom::RuleMissionScript::getExecutionOdds | ( | ) | const |
Gets the odds of this command executing.
int OpenXcom::RuleMissionScript::getFirstMonth | ( | ) | const |
Gets the first month this command will run.
int OpenXcom::RuleMissionScript::getLabel | ( | ) | const |
Gets the label of this command, used for conditionals.
int OpenXcom::RuleMissionScript::getLastMonth | ( | ) | const |
Gets the last month this command will run.
int OpenXcom::RuleMissionScript::getMaxRuns | ( | ) | const |
Gets the maximum number of times to run a command with this varName.
int OpenXcom::RuleMissionScript::getMinDifficulty | ( | ) | const |
Gets the minimum difficulty for this command to run.
std::vector< std::string > OpenXcom::RuleMissionScript::getMissionTypes | ( | const int | month | ) | const |
Gets a list of the mission types in this command's mission weights for a given month.
month | the month for which we want info. |
std::vector< std::string > OpenXcom::RuleMissionScript::getRegions | ( | const int | month | ) | const |
Gets a list of the regions in this command's region weights for a given month.
month | the month for which we want info. |
int OpenXcom::RuleMissionScript::getRepeatAvoidance | ( | ) | const |
Gets how many previous mission sites to keep track of (to avoid using them again)
const std::map< std::string, bool > & OpenXcom::RuleMissionScript::getResearchTriggers | ( | ) | const |
Gets the research triggers that may apply to this command.
bool OpenXcom::RuleMissionScript::getSiteType | ( | ) | const |
Checks if this is a terror-type mission or not.
int OpenXcom::RuleMissionScript::getTargetBaseOdds | ( | ) | const |
Gets the odds of this mission targetting an xcom base.
std::string OpenXcom::RuleMissionScript::getType | ( | ) | const |
Gets the name of the script command.
Gets the name of this command.
bool OpenXcom::RuleMissionScript::getUseTable | ( | ) | const |
Delete this mission from the table? stops it coming up again in random selection, but NOT if a missionScript calls it by name.
std::string OpenXcom::RuleMissionScript::getVarName | ( | ) | const |
Gets the name of the variable to use for keeping track of... things.
bool OpenXcom::RuleMissionScript::hasMissionWeights | ( | ) | const |
Does this command have mission weights?
bool OpenXcom::RuleMissionScript::hasRaceWeights | ( | ) | const |
Does this command have raceWeights?
bool OpenXcom::RuleMissionScript::hasRegionWeights | ( | ) | const |
Does this command have region weights?
void OpenXcom::RuleMissionScript::load | ( | const YAML::Node & | node | ) |
Loads a mission script from yaml.
Loads a missionScript from a YML file.
node | the node within the file we're reading. |
void OpenXcom::RuleMissionScript::setSiteType | ( | const bool | siteType | ) |
Sets this script to a terror mission type command or not.
siteType | set this command to be a missionSite type or not. |