OpenXcom  1.0
Open-source clone of the original X-Com
Public Member Functions | Static Public Member Functions | List of all members
OpenXcom::StatString Class Reference

For adding statStrings to the game. More...

#include <StatString.h>

Public Member Functions

 StatString ()
 Creates a blank StatString ruleset. More...
 
virtual ~StatString ()
 Cleans up the StatString ruleset. More...
 
void load (const YAML::Node &node)
 Loads the StatString from YAML. More...
 
const std::vector< StatStringCondition * > & getConditions () const
 Get the conditions for this StatString. More...
 
std::string getString () const
 Get the StatString string. More...
 

Static Public Member Functions

static std::string calcStatString (UnitStats &currentStats, const std::vector< StatString *> &statStrings, bool psiStrengthEval, bool inTraining)
 Calculate a StatString. More...
 
static std::map< std::string, int > getCurrentStats (UnitStats &currentStats)
 Get the CurrentStats. More...
 

Detailed Description

For adding statStrings to the game.

See http://ufopaedia.org/index.php?title=Statstrings

Constructor & Destructor Documentation

◆ StatString()

OpenXcom::StatString::StatString ( )

Creates a blank StatString ruleset.

Creates a blank StatString.

◆ ~StatString()

OpenXcom::StatString::~StatString ( )
virtual

Cleans up the StatString ruleset.

Cleans up the extra StatString.

Member Function Documentation

◆ calcStatString()

std::string OpenXcom::StatString::calcStatString ( UnitStats currentStats,
const std::vector< StatString *> &  statStrings,
bool  psiStrengthEval,
bool  inTraining 
)
static

Calculate a StatString.

Calculates the list of StatStrings that apply to certain unit stats.

Parameters
currentStatsUnit stats.
statStringsList of statString rules.
psiStrengthEvalAre psi stats available?
Returns
Resulting string of all valid StatStrings.

◆ getConditions()

const std::vector< StatStringCondition * > & OpenXcom::StatString::getConditions ( ) const

Get the conditions for this StatString.

Returns the conditions associated with this StatString.

Returns
List of StatStringConditions.

◆ getCurrentStats()

std::map< std::string, int > OpenXcom::StatString::getCurrentStats ( UnitStats currentStats)
static

Get the CurrentStats.

Get a map associating stat names to unit stats.

Parameters
currentStatsUnit stats to use.
Returns
Map of unit stats.

◆ getString()

std::string OpenXcom::StatString::getString ( ) const

Get the StatString string.

Returns the string to add to a name for this StatString.

Returns
StatString... string.

◆ load()

void OpenXcom::StatString::load ( const YAML::Node &  node)

Loads the StatString from YAML.

Loads the StatString from a YAML file.

Parameters
nodeYAML node.

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