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::RuleSoldier Class Reference

Represents the creation data for a specific type of unit. More...

#include <RuleSoldier.h>

Public Member Functions

 RuleSoldier (const std::string &type)
 Creates a blank unit ruleset. More...
 
 ~RuleSoldier ()
 Cleans up the unit ruleset.
 
void load (const YAML::Node &node)
 Loads the unit data from YAML. More...
 
std::string getType () const
 Gets the unit's type. More...
 
UnitStats getMinStats () const
 Gets the minimum stats for the random stats generator. More...
 
UnitStats getMaxStats () const
 Gets the maximum stats for the random stats generator. More...
 
UnitStats getStatCaps () const
 Gets the stat caps. More...
 
int getStandHeight () const
 Gets the height of the soldier when it's standing. More...
 
int getKneelHeight () const
 Gets the height of the soldier when it's kneeling. More...
 
int getFloatHeight () const
 Gets the elevation of the soldier when it's flying. More...
 
std::string getArmor () const
 Gets the armor name. More...
 

Detailed Description

Represents the creation data for a specific type of unit.

This info is copied to either Soldier for XCom soldiers or BattleUnit for aliens and civilians.

See also
Soldier BattleUnit

Constructor & Destructor Documentation

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

Creates a blank unit ruleset.

Creates a blank ruleunit for a certain type of soldier.

Parameters
typeString defining the type.

Member Function Documentation

std::string OpenXcom::RuleSoldier::getArmor ( ) const

Gets the armor name.

Returns
The armor name.
int OpenXcom::RuleSoldier::getFloatHeight ( ) const

Gets the elevation of the soldier when it's flying.

Returns
The floating height.
int OpenXcom::RuleSoldier::getKneelHeight ( ) const

Gets the height of the soldier when it's kneeling.

Returns
The kneeling height.
UnitStats OpenXcom::RuleSoldier::getMaxStats ( ) const

Gets the maximum stats for the random stats generator.

Returns
The maximum stats.
UnitStats OpenXcom::RuleSoldier::getMinStats ( ) const

Gets the minimum stats for the random stats generator.

Returns
The minimum stats.
int OpenXcom::RuleSoldier::getStandHeight ( ) const

Gets the height of the soldier when it's standing.

Returns
The standing height.
UnitStats OpenXcom::RuleSoldier::getStatCaps ( ) const

Gets the stat caps.

Returns
The stat caps.
std::string OpenXcom::RuleSoldier::getType ( ) const

Gets the unit's type.

Returns the language string that names this unit.

Each unit type has a unique name.

Returns
Unit name.
void OpenXcom::RuleSoldier::load ( const YAML::Node &  node)

Loads the unit data from YAML.

Loads the unit from a YAML file.

Parameters
nodeYAML node.

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