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, _femaleFrequency;
43 std::vector<int> _deathSoundMale, _deathSoundFemale;
44 std::vector<SoldierNamePool*> _names;
46 void addSoldierNamePool(
const std::string &namFile);
53 void load(
const YAML::Node& node,
Mod *mod);
83 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:199
int getFloatHeight() const
Gets the elevation of the soldier when it's flying.
Definition: RuleSoldier.cpp:226
~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:262
int getStandHeight() const
Gets the height of the soldier when it's standing.
Definition: RuleSoldier.cpp:208
UnitStats getMaxStats() const
Gets the maximum stats for the random stats generator.
Definition: RuleSoldier.cpp:172
const std::vector< int > & getMaleDeathSounds() const
Gets the soldier's male death sounds.
Definition: RuleSoldier.cpp:253
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:190
const std::vector< std::string > & getRequirements() const
Gets the soldier's requirements.
Definition: RuleSoldier.cpp:154
Represents the creation data for an X-COM unit.
Definition: RuleSoldier.h:35
UnitStats getStatCaps() const
Gets the stat caps.
Definition: RuleSoldier.cpp:181
const std::vector< SoldierNamePool * > & getNames() const
Gets the pool list for soldier names.
Definition: RuleSoldier.cpp:271
std::string getType() const
Gets the soldier's type.
Definition: RuleSoldier.cpp:144
int getKneelHeight() const
Gets the height of the soldier when it's kneeling.
Definition: RuleSoldier.cpp:217
UnitStats getMinStats() const
Gets the minimum stats for the random stats generator.
Definition: RuleSoldier.cpp:163
std::string getArmor() const
Gets the default-equipped armor.
Definition: RuleSoldier.cpp:235
Definition: BaseInfoState.cpp:40
int getFemaleFrequency() const
Gets the female appearance ratio.
Definition: RuleSoldier.cpp:244