OpenXcom
1.0
Open-source clone of the original X-Com
|
Represents a specific type of base facility. More...
#include <RuleBaseFacility.h>
Public Member Functions | |
RuleBaseFacility (const std::string &type) | |
Creates a blank facility ruleset. More... | |
~RuleBaseFacility () | |
Cleans up the facility ruleset. | |
void | load (const YAML::Node &node, int modIndex, int listOrder) |
Loads the facility from YAML. More... | |
std::string | getType () const |
Gets the facility's type. More... | |
const std::vector< std::string > & | getRequirements () const |
Gets the facility's requirements. More... | |
int | getSpriteShape () const |
Gets the facility's shape sprite. More... | |
int | getSpriteFacility () const |
Gets the facility's content sprite. More... | |
int | getSize () const |
Gets the facility's size. More... | |
bool | isLift () const |
Gets if the facility is an access lift. More... | |
bool | isHyperwave () const |
Gets if the facility has hyperwave detection. More... | |
bool | isMindShield () const |
Gets if the facility is a mind shield. More... | |
bool | isGravShield () const |
Gets if the facility is a grav shield. More... | |
int | getBuildCost () const |
Gets the facility's construction cost. More... | |
int | getBuildTime () const |
Gets the facility's construction time. More... | |
int | getMonthlyCost () const |
Gets the facility's monthly cost. More... | |
int | getStorage () const |
Gets the facility's storage capacity. More... | |
int | getPersonnel () const |
Gets the facility's personnel capacity. More... | |
int | getAliens () const |
Gets the facility's alien capacity. More... | |
int | getCrafts () const |
Gets the facility's craft capacity. More... | |
int | getLaboratories () const |
Gets the facility's laboratory space. More... | |
int | getWorkshops () const |
Gets the facility's workshop space. More... | |
int | getPsiLaboratories () const |
Gets the facility's psi-training capacity. More... | |
int | getRadarRange () const |
Gets the facility's radar range. More... | |
int | getRadarChance () const |
Gets the facility's detection chance. More... | |
int | getDefenseValue () const |
Gets the facility's defense value. More... | |
int | getHitRatio () const |
Gets the facility's weapon hit ratio. More... | |
std::string | getMapName () const |
Gets the facility's battlescape map name. More... | |
int | getFireSound () const |
Gets the facility's fire sound. More... | |
int | getHitSound () const |
Gets the facility's hit sound. More... | |
int | getListOrder () const |
Gets the facility's list weight. More... | |
Represents a specific type of base facility.
Contains constant info about a facility like costs, capacities, size, etc.
OpenXcom::RuleBaseFacility::RuleBaseFacility | ( | const std::string & | type | ) |
Creates a blank facility ruleset.
Creates a blank ruleset for a certain type of base facility.
type | String defining the type. |
int OpenXcom::RuleBaseFacility::getAliens | ( | ) | const |
Gets the facility's alien capacity.
Gets the number of captured live aliens this facility can contain.
int OpenXcom::RuleBaseFacility::getBuildCost | ( | ) | const |
Gets the facility's construction cost.
Gets the amount of funds that this facility costs to build on a base.
int OpenXcom::RuleBaseFacility::getBuildTime | ( | ) | const |
Gets the facility's construction time.
Gets the amount of time that this facility takes to be constructed since placement.
int OpenXcom::RuleBaseFacility::getCrafts | ( | ) | const |
Gets the facility's craft capacity.
Gets the number of base craft this facility can contain.
int OpenXcom::RuleBaseFacility::getDefenseValue | ( | ) | const |
Gets the facility's defense value.
Gets the defense value of this facility's weaponry against UFO invasions on the base.
int OpenXcom::RuleBaseFacility::getFireSound | ( | ) | const |
Gets the facility's fire sound.
Gets the fire sound of this facility's weaponry.
int OpenXcom::RuleBaseFacility::getHitRatio | ( | ) | const |
Gets the facility's weapon hit ratio.
Gets the hit ratio of this facility's weaponry against UFO invasions on the base.
int OpenXcom::RuleBaseFacility::getHitSound | ( | ) | const |
Gets the facility's hit sound.
Gets the hit sound of this facility's weaponry.
int OpenXcom::RuleBaseFacility::getLaboratories | ( | ) | const |
Gets the facility's laboratory space.
Gets the amount of laboratory space this facility provides for research projects.
int OpenXcom::RuleBaseFacility::getListOrder | ( | ) | const |
Gets the facility's list weight.
std::string OpenXcom::RuleBaseFacility::getMapName | ( | ) | const |
Gets the facility's battlescape map name.
Gets the battlescape map block name for this facility to construct the base defense mission map.
int OpenXcom::RuleBaseFacility::getMonthlyCost | ( | ) | const |
Gets the facility's monthly cost.
Gets the amount of funds this facility costs monthly to maintain once it's fully built.
int OpenXcom::RuleBaseFacility::getPersonnel | ( | ) | const |
Gets the facility's personnel capacity.
Gets the number of base personnel (soldiers, scientists, engineers) this facility can contain.
int OpenXcom::RuleBaseFacility::getPsiLaboratories | ( | ) | const |
Gets the facility's psi-training capacity.
Gets the number of soldiers this facility can contain for monthly psi-training.
int OpenXcom::RuleBaseFacility::getRadarChance | ( | ) | const |
Gets the facility's detection chance.
Gets the chance of UFOs that come within the facility's radar range being detected.
int OpenXcom::RuleBaseFacility::getRadarRange | ( | ) | const |
Gets the facility's radar range.
Gets the radar range this facility provides for the detection of UFOs.
const std::vector< std::string > & OpenXcom::RuleBaseFacility::getRequirements | ( | ) | const |
Gets the facility's requirements.
Gets the list of research required to build this base facility.
int OpenXcom::RuleBaseFacility::getSize | ( | ) | const |
Gets the facility's size.
Gets the size of the facility on the base grid.
int OpenXcom::RuleBaseFacility::getSpriteFacility | ( | ) | const |
Gets the facility's content sprite.
Gets the ID of the sprite used to draw the facility's contents inside the base shape.
int OpenXcom::RuleBaseFacility::getSpriteShape | ( | ) | const |
Gets the facility's shape sprite.
Gets the ID of the sprite used to draw the base structure of the facility that defines its shape.
int OpenXcom::RuleBaseFacility::getStorage | ( | ) | const |
Gets the facility's storage capacity.
Gets the amount of storage space this facility provides for base equipment.
std::string OpenXcom::RuleBaseFacility::getType | ( | ) | const |
Gets the facility's type.
Gets the language string that names this base facility.
Each base facility type has a unique name.
int OpenXcom::RuleBaseFacility::getWorkshops | ( | ) | const |
Gets the facility's workshop space.
Gets the amount of workshop space this facility provides for manufacturing projects.
bool OpenXcom::RuleBaseFacility::isGravShield | ( | ) | const |
Gets if the facility is a grav shield.
Checks if this facility has a grav shield, which doubles base defense's fire ratio.
bool OpenXcom::RuleBaseFacility::isHyperwave | ( | ) | const |
Gets if the facility has hyperwave detection.
Checks if this facility has hyperwave detection capabilities.
This allows it to get extra details about UFOs.
bool OpenXcom::RuleBaseFacility::isLift | ( | ) | const |
Gets if the facility is an access lift.
Checks if this facility is the core access lift of a base.
Every base has an access lift and all facilities have to be connected to it.
bool OpenXcom::RuleBaseFacility::isMindShield | ( | ) | const |
Gets if the facility is a mind shield.
Checks if this facility has a mind shield, which covers your base from alien detection.
void OpenXcom::RuleBaseFacility::load | ( | const YAML::Node & | node, |
int | modIndex, | ||
int | listOrder | ||
) |
Loads the facility from YAML.
Loads the base facility type from a YAML file.
node | YAML node. |
modIndex | A value that offsets the sounds and sprite values to avoid conflicts. |
listOrder | The list weight for this facility. |