OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
OpenXcom::Armor Class Reference

Represents a specific type of armor. More...

#include <Armor.h>

Public Member Functions

 Armor (const std::string &type)
 Creates a blank armor ruleset. More...
 
 ~Armor ()
 Cleans up the armor ruleset.
 
void load (const YAML::Node &node)
 Loads the armor data from YAML. More...
 
std::string getType () const
 Gets the armor's type. More...
 
std::string getSpriteSheet () const
 Gets the unit's sprite sheet. More...
 
std::string getSpriteInventory () const
 Gets the unit's inventory sprite. More...
 
int getFrontArmor () const
 Gets the front armor level. More...
 
int getSideArmor () const
 Gets the side armor level. More...
 
int getRearArmor () const
 Gets the rear armor level. More...
 
int getUnderArmor () const
 Gets the under armor level. More...
 
std::string getCorpseGeoscape () const
 Gets the Geoscape corpse item. More...
 
const std::vector< std::string > & getCorpseBattlescape () const
 Gets the Battlescape corpse item. More...
 
std::string getStoreItem () const
 Gets the stores item. More...
 
int getDrawingRoutine () const
 Gets the battlescape drawing routine ID. More...
 
MovementType getMovementType () const
 Gets whether the armor can fly. More...
 
int getSize () const
 Gets whether this is a normal or big unit. More...
 
float getDamageModifier (ItemDamageType dt)
 Gets damage modifier. More...
 
std::vector< int > getLoftempsSet () const
 Gets loftempSet. More...
 
UnitStatsgetStats ()
 Gets the armor's stats. More...
 
int getWeight ()
 Gets the armor's weight. More...
 

Detailed Description

Represents a specific type of armor.

Not only soldier armor, but also alien armor - some alien races wear Soldier Armor, Leader Armor or Commander Armor depending on their rank.

Constructor & Destructor Documentation

OpenXcom::Armor::Armor ( const std::string &  type)

Creates a blank armor ruleset.

Creates a blank ruleset for a certain type of armor.

Parameters
typeString defining the type.

Member Function Documentation

const std::vector< std::string > & OpenXcom::Armor::getCorpseBattlescape ( ) const

Gets the Battlescape corpse item.

Gets the list of corpse items dropped by the unit in the Battlescape (one per unit tile).

Returns
The list of corpse items.
std::string OpenXcom::Armor::getCorpseGeoscape ( ) const

Gets the Geoscape corpse item.

Gets the corpse item used in the Geoscape.

Returns
The name of the corpse item.
float OpenXcom::Armor::getDamageModifier ( ItemDamageType  dt)

Gets damage modifier.

Gets the damage modifier for a certain damage type.

Parameters
dtThe damageType.
Returns
The damage modifier 0->1.
int OpenXcom::Armor::getDrawingRoutine ( ) const

Gets the battlescape drawing routine ID.

Gets the drawing routine ID.

Returns
The drawing routine ID.
int OpenXcom::Armor::getFrontArmor ( ) const

Gets the front armor level.

Returns
The front armor level.
std::vector< int > OpenXcom::Armor::getLoftempsSet ( ) const

Gets loftempSet.

Gets the loftempSet.

Returns
The loftempsSet.
MovementType OpenXcom::Armor::getMovementType ( ) const

Gets whether the armor can fly.

Gets the movement type of this armor.

Useful for determining whether the armor can fly.

Returns
The movement type.
int OpenXcom::Armor::getRearArmor ( ) const

Gets the rear armor level.

Returns
The rear armor level.
int OpenXcom::Armor::getSideArmor ( ) const

Gets the side armor level.

Returns
The side armor level.
int OpenXcom::Armor::getSize ( ) const

Gets whether this is a normal or big unit.

Gets the size of the unit.

Normally this is 1 (small) or 2 (big).

Returns
The unit's size.
std::string OpenXcom::Armor::getSpriteInventory ( ) const

Gets the unit's inventory sprite.

Returns
The inventory sprite name.
std::string OpenXcom::Armor::getSpriteSheet ( ) const

Gets the unit's sprite sheet.

Returns
The sprite sheet name.
UnitStats * OpenXcom::Armor::getStats ( )

Gets the armor's stats.

Gets pointer to the armor's stats.

Returns
stats Pointer to the armor's stats.
std::string OpenXcom::Armor::getStoreItem ( ) const

Gets the stores item.

Gets the storage item needed to equip this.

Returns
The name of the store item.
std::string OpenXcom::Armor::getType ( ) const

Gets the armor's type.

Returns the language string that names this armor.

Each armor has a unique name. Coveralls, Power Suit,...

Returns
The armor name.
int OpenXcom::Armor::getUnderArmor ( ) const

Gets the under armor level.

Returns
The under armor level.
int OpenXcom::Armor::getWeight ( )

Gets the armor's weight.

Returns
the weight of the armor.
void OpenXcom::Armor::load ( const YAML::Node &  node)

Loads the armor data from YAML.

Loads the armor from a YAML file.

Parameters
nodeYAML node.

The documentation for this class was generated from the following files: