OpenXcom
1.0
Open-source clone of the original X-Com
|
Represents a specific type of craft. More...
#include <RuleCraft.h>
Public Member Functions | |
RuleCraft (const std::string &type) | |
Creates a blank craft ruleset. More... | |
~RuleCraft () | |
Cleans up the craft ruleset. | |
void | load (const YAML::Node &node, Ruleset *ruleset, int modIndex, int nextCraftIndex) |
Loads craft data from YAML. More... | |
std::string | getType () const |
Gets the craft's type. More... | |
const std::vector< std::string > & | getRequirements () const |
Gets the craft's requirements. More... | |
int | getSprite () const |
Gets the craft's sprite. More... | |
int | getMaxFuel () const |
Gets the craft's maximum fuel. More... | |
int | getMaxDamage () const |
Gets the craft's maximum damage. More... | |
int | getMaxSpeed () const |
Gets the craft's maximum speed. More... | |
int | getAcceleration () const |
Gets the craft's acceleration. More... | |
int | getWeapons () const |
Gets the craft's weapon capacity. More... | |
int | getSoldiers () const |
Gets the craft's soldier capacity. More... | |
int | getVehicles () const |
Gets the craft's vehicle capacity. More... | |
int | getBuyCost () const |
Gets the craft's cost. More... | |
int | getRentCost () const |
Gets the craft's rent for a month. More... | |
int | getSellCost () const |
Gets the craft's value. More... | |
std::string | getRefuelItem () const |
Gets the craft's refuel item. More... | |
int | getRepairRate () const |
Gets the craft's repair rate. More... | |
int | getRefuelRate () const |
Gets the craft's refuel rate. More... | |
int | getRadarRange () const |
Gets the craft's radar range. More... | |
int | getTransferTime () const |
Gets the craft's transfer time. More... | |
int | getScore () const |
Gets the craft's score. More... | |
RuleTerrain * | getBattlescapeTerrainData () |
Gets the craft's terrain data. More... | |
bool | getSpacecraft () const |
Checks if this craft is capable of travelling to mars. More... | |
int | getListOrder () const |
Gets the list weight for this craft. More... | |
std::vector< std::vector< int > > & | getDeployment () |
Gets the deployment priority for the craft. More... | |
Represents a specific type of craft.
Contains constant info about a craft like costs, speed, capacities, consumptions, etc.
OpenXcom::RuleCraft::RuleCraft | ( | const std::string & | type | ) |
Creates a blank craft ruleset.
Creates a blank ruleset for a certain type of craft.
type | String defining the type. |
int OpenXcom::RuleCraft::getAcceleration | ( | ) | const |
Gets the craft's acceleration.
Gets the acceleration of the craft for taking off / stopping.
RuleTerrain * OpenXcom::RuleCraft::getBattlescapeTerrainData | ( | ) |
Gets the craft's terrain data.
Gets the terrain data needed to draw the Craft in the battlescape.
int OpenXcom::RuleCraft::getBuyCost | ( | ) | const |
Gets the craft's cost.
Gets the cost of this craft for purchase/rent (0 if not purchasable).
std::vector< std::vector< int > > & OpenXcom::RuleCraft::getDeployment | ( | ) |
Gets the deployment priority for the craft.
Gets the deployment layout for this craft.
int OpenXcom::RuleCraft::getListOrder | ( | ) | const |
Gets the list weight for this craft.
Gets the list weight for this research item.
int OpenXcom::RuleCraft::getMaxDamage | ( | ) | const |
Gets the craft's maximum damage.
Gets the maximum damage (damage the craft can take) of the craft.
int OpenXcom::RuleCraft::getMaxFuel | ( | ) | const |
Gets the craft's maximum fuel.
Gets the maximum fuel the craft can contain.
int OpenXcom::RuleCraft::getMaxSpeed | ( | ) | const |
Gets the craft's maximum speed.
Gets the maximum speed of the craft flying around the Geoscape.
int OpenXcom::RuleCraft::getRadarRange | ( | ) | const |
Gets the craft's radar range.
Gets the craft's radar range for detecting UFOs.
std::string OpenXcom::RuleCraft::getRefuelItem | ( | ) | const |
Gets the craft's refuel item.
Gets what item is required while the craft is refuelling.
int OpenXcom::RuleCraft::getRefuelRate | ( | ) | const |
Gets the craft's refuel rate.
Gets how much fuel is added to the craft while refuelling.
int OpenXcom::RuleCraft::getRentCost | ( | ) | const |
Gets the craft's rent for a month.
Gets the cost of rent for a month.
int OpenXcom::RuleCraft::getRepairRate | ( | ) | const |
Gets the craft's repair rate.
Gets how much damage is removed from the craft while repairing.
const std::vector< std::string > & OpenXcom::RuleCraft::getRequirements | ( | ) | const |
Gets the craft's requirements.
Gets the list of research required to acquire this craft.
int OpenXcom::RuleCraft::getScore | ( | ) | const |
Gets the craft's score.
Gets the number of points you lose when this craft is destroyed.
int OpenXcom::RuleCraft::getSellCost | ( | ) | const |
Gets the craft's value.
Gets the sell value of this craft Rented craft should use 0.
int OpenXcom::RuleCraft::getSoldiers | ( | ) | const |
Gets the craft's soldier capacity.
Gets the maximum number of soldiers that the craft can carry.
bool OpenXcom::RuleCraft::getSpacecraft | ( | ) | const |
Checks if this craft is capable of travelling to mars.
Checks if this ship is capable of going to mars.
int OpenXcom::RuleCraft::getSprite | ( | ) | const |
Gets the craft's sprite.
Gets the ID of the sprite used to draw the craft in the Basescape and Equip Craft screens.
int OpenXcom::RuleCraft::getTransferTime | ( | ) | const |
Gets the craft's transfer time.
Gets the amount of time this item takes to arrive at a base.
std::string OpenXcom::RuleCraft::getType | ( | ) | const |
Gets the craft's type.
Gets the language string that names this craft.
Each craft type has a unique name.
int OpenXcom::RuleCraft::getVehicles | ( | ) | const |
Gets the craft's vehicle capacity.
Gets the maximum number of vehicles that the craft can carry.
int OpenXcom::RuleCraft::getWeapons | ( | ) | const |
Gets the craft's weapon capacity.
Gets the maximum number of weapons that can be equipped onto the craft.
void OpenXcom::RuleCraft::load | ( | const YAML::Node & | node, |
Ruleset * | ruleset, | ||
int | modIndex, | ||
int | listOrder | ||
) |
Loads craft data from YAML.
Loads the craft from a YAML file.
node | YAML node. |
ruleset | Ruleset for the craft. |
modIndex | A value that offsets the sounds and sprite values to avoid conflicts. |
listOrder | The list weight for this craft. |