OpenXcom
1.0
Open-source clone of the original X-Com
|
Represents a region of the world. More...
#include <Region.h>
Public Member Functions | |
Region (RuleRegion *rules) | |
Creates a new region of the specified type. More... | |
~Region () | |
Cleans up the region. | |
void | load (const YAML::Node &node) |
Loads the region from YAML. More... | |
YAML::Node | save () const |
Saves the region to YAML. More... | |
RuleRegion * | getRules () const |
Gets the region's ruleset. More... | |
void | addActivityXcom (int activity) |
add xcom activity in this region More... | |
void | addActivityAlien (int activity) |
add alien activity in this region More... | |
const std::vector< int > & | getActivityXcom () const |
get xcom activity to this region More... | |
const std::vector< int > & | getActivityAlien () const |
get xcom activity to this region More... | |
void | newMonth () |
start new month of activity More... | |
Represents a region of the world.
Contains variable info about a region like X-Com and alien activity in it.
OpenXcom::Region::Region | ( | RuleRegion * | rules | ) |
Creates a new region of the specified type.
Initializes a region of the specified type.
rules | Pointer to ruleset. |
void OpenXcom::Region::addActivityAlien | ( | int | activity | ) |
add alien activity in this region
Adds to the region's alien activity level.
activity | Amount to add. |
void OpenXcom::Region::addActivityXcom | ( | int | activity | ) |
add xcom activity in this region
Adds to the region's xcom activity level.
activity | Amount to add. |
const std::vector< int > & OpenXcom::Region::getActivityAlien | ( | ) | const |
get xcom activity to this region
Gets the region's alien activity level.
const std::vector< int > & OpenXcom::Region::getActivityXcom | ( | ) | const |
get xcom activity to this region
Gets the region's xcom activity level.
RuleRegion * OpenXcom::Region::getRules | ( | ) | const |
Gets the region's ruleset.
Returns the ruleset for the region's type.
void OpenXcom::Region::load | ( | const YAML::Node & | node | ) |
Loads the region from YAML.
Loads the region from a YAML file.
node | YAML node. |
void OpenXcom::Region::newMonth | ( | ) |
start new month of activity
Store last month's counters, start new counters.
YAML::Node OpenXcom::Region::save | ( | ) | const |
Saves the region to YAML.
Saves the region to a YAML file.