21 #include <yaml-cpp/yaml.h> 28 class SoldierNamePool;
39 std::vector<std::string> _requires;
40 UnitStats _minStats, _maxStats, _statCaps;
42 int _costBuy, _costSalary, _standHeight, _kneelHeight, _floatHeight;
43 int _femaleFrequency, _value, _transferTime;
44 std::vector<int> _deathSoundMale, _deathSoundFemale;
45 std::vector<SoldierNamePool*> _names;
47 void addSoldierNamePool(
const std::string &namFile);
54 void load(
const YAML::Node& node,
Mod *mod);
84 const std::vector<SoldierNamePool*> &
getNames()
const;
RuleSoldier(const std::string &type)
Creates a blank soldier ruleset.
Definition: RuleSoldier.cpp:32
int getSalaryCost() const
Gets the monthly salary of the soldier.
Definition: RuleSoldier.cpp:201
int getFloatHeight() const
Gets the elevation of the soldier when it's flying.
Definition: RuleSoldier.cpp:228
int getValue() const
Gets the value - for score calculation.
Definition: RuleSoldier.cpp:282
~RuleSoldier()
Cleans up the soldier ruleset.
Definition: RuleSoldier.cpp:39
Contains all the game-specific static data that never changes throughout the game, like rulesets and resources.
Definition: Mod.h:87
void load(const YAML::Node &node, Mod *mod)
Loads the soldier data from YAML.
Definition: RuleSoldier.cpp:52
const std::vector< int > & getFemaleDeathSounds() const
Gets the soldier's female death sounds.
Definition: RuleSoldier.cpp:264
int getStandHeight() const
Gets the height of the soldier when it's standing.
Definition: RuleSoldier.cpp:210
UnitStats getMaxStats() const
Gets the maximum stats for the random stats generator.
Definition: RuleSoldier.cpp:174
const std::vector< int > & getMaleDeathSounds() const
Gets the soldier's male death sounds.
Definition: RuleSoldier.cpp:255
This struct holds some plain unit attribute data together.
Definition: Unit.h:30
int getBuyCost() const
Gets the cost of the soldier.
Definition: RuleSoldier.cpp:192
const std::vector< std::string > & getRequirements() const
Gets the soldier's requirements.
Definition: RuleSoldier.cpp:156
Represents the creation data for an X-COM unit.
Definition: RuleSoldier.h:35
UnitStats getStatCaps() const
Gets the stat caps.
Definition: RuleSoldier.cpp:183
const std::vector< SoldierNamePool * > & getNames() const
Gets the pool list for soldier names.
Definition: RuleSoldier.cpp:273
int getTransferTime() const
Gets the soldier's transfer time.
Definition: RuleSoldier.cpp:292
std::string getType() const
Gets the soldier's type.
Definition: RuleSoldier.cpp:146
int getKneelHeight() const
Gets the height of the soldier when it's kneeling.
Definition: RuleSoldier.cpp:219
UnitStats getMinStats() const
Gets the minimum stats for the random stats generator.
Definition: RuleSoldier.cpp:165
std::string getArmor() const
Gets the default-equipped armor.
Definition: RuleSoldier.cpp:237
Definition: BaseInfoState.cpp:40
int getFemaleFrequency() const
Gets the female appearance ratio.
Definition: RuleSoldier.cpp:246