OpenXcom
1.0
Open-source clone of the original X-Com
|
Represents a country that funds the player. More...
#include <Country.h>
Public Member Functions | |
Country (RuleCountry *rules, bool gen=true) | |
Creates a new country of the specified type. More... | |
~Country () | |
Cleans up the country. | |
void | load (const YAML::Node &node) |
Loads the country from YAML. More... | |
YAML::Node | save () const |
Saves the country to YAML. More... | |
RuleCountry * | getRules () const |
Gets the country's ruleset. More... | |
const std::vector< int > & | getFunding () const |
Gets the country's funding. More... | |
void | setFunding (int funding) |
Sets the country's funding. More... | |
int | getSatisfaction () |
get the country's satisfaction level | |
void | addActivityXcom (int activity) |
add xcom activity in this country More... | |
void | addActivityAlien (int activity) |
add alien activity in this country More... | |
const std::vector< int > & | getActivityXcom () const |
get xcom activity to this country More... | |
const std::vector< int > & | getActivityAlien () const |
get xcom activity to this country More... | |
void | newMonth (int xcomTotal, int alienTotal) |
store last month's counters, start new counters, set this month's change. More... | |
bool | getNewPact () |
are we signing a new pact? More... | |
void | setNewPact () |
sign a pact at the end of this month. More... | |
bool | getPact () |
have we signed a pact? More... | |
Represents a country that funds the player.
Contains variable info about a country like monthly funding and various activities.
OpenXcom::Country::Country | ( | RuleCountry * | rules, |
bool | gen = true |
||
) |
Creates a new country of the specified type.
Initializes a country of the specified type.
rules | Pointer to ruleset. |
gen | Generate new funding. |
void OpenXcom::Country::addActivityAlien | ( | int | activity | ) |
add alien activity in this country
Adds to the country's alien activity level.
activity | how many points to add. |
void OpenXcom::Country::addActivityXcom | ( | int | activity | ) |
add xcom activity in this country
Adds to the country's xcom activity level.
activity | how many points to add. |
const std::vector< int > & OpenXcom::Country::getActivityAlien | ( | ) | const |
get xcom activity to this country
Gets the country's alien activity level.
const std::vector< int > & OpenXcom::Country::getActivityXcom | ( | ) | const |
get xcom activity to this country
Gets the country's xcom activity level.
const std::vector< int > & OpenXcom::Country::getFunding | ( | ) | const |
Gets the country's funding.
Returns the country's current monthly funding.
bool OpenXcom::Country::getNewPact | ( | ) |
are we signing a new pact?
bool OpenXcom::Country::getPact | ( | ) |
have we signed a pact?
no setter for this one, as it gets set automatically at month's end if _newPact is set.
RuleCountry * OpenXcom::Country::getRules | ( | ) | const |
Gets the country's ruleset.
Returns the ruleset for the country's type.
void OpenXcom::Country::load | ( | const YAML::Node & | node | ) |
Loads the country from YAML.
Loads the country from a YAML file.
node | YAML node. |
void OpenXcom::Country::newMonth | ( | int | xcomTotal, |
int | alienTotal | ||
) |
store last month's counters, start new counters, set this month's change.
reset all the counters, calculate this month's funding, set the change value for the month.
xcomTotal | the council's xcom score |
alienTotal | the council's alien score |
YAML::Node OpenXcom::Country::save | ( | ) | const |
Saves the country to YAML.
Saves the country to a YAML file.
void OpenXcom::Country::setFunding | ( | int | funding | ) |
Sets the country's funding.
Changes the country's current monthly funding.
funding | Monthly funding. |
void OpenXcom::Country::setNewPact | ( | ) |
sign a pact at the end of this month.
sign a new pact at month's end.