22 #include <yaml-cpp/yaml.h> 29 enum ForcedTorso { TORSO_USE_GENDER, TORSO_ALWAYS_MALE, TORSO_ALWAYS_FEMALE };
38 static const int DAMAGE_TYPES = 10;
39 static const std::string NONE;
41 std::string _type, _spriteSheet, _spriteInv, _corpseGeo, _storeItem, _specWeapon;
42 std::vector<std::string> _corpseBattle;
43 int _frontArmor, _sideArmor, _rearArmor, _underArmor, _drawingRoutine;
44 MovementType _movementType;
46 float _damageModifier[DAMAGE_TYPES];
47 std::vector<int> _loftempsSet;
50 bool _constantAnimation, _canHoldWeapon, _hasInventory;
51 ForcedTorso _forcedTorso;
52 int _faceColorGroup, _hairColorGroup, _utileColorGroup, _rankColorGroup;
53 std::vector<int> _faceColor, _hairColor, _utileColor, _rankColor;
54 std::vector<std::string> _units;
57 Armor(
const std::string &type);
61 void load(
const YAML::Node& node);
125 const std::vector<std::string> &
getUnits()
const;
bool hasInventory() const
Can we access this unit's inventory?
Definition: Armor.cpp:435
std::string getType() const
Gets the armor's type.
Definition: Armor.cpp:130
int getFaceColor(int i) const
Get face base color.
Definition: Armor.cpp:371
int getHairColorGroup() const
Get hair base color.
Definition: Armor.cpp:344
const std::vector< int > & getLoftempsSet() const
Gets loftempSet.
Definition: Armor.cpp:272
std::string getSpecialWeapon() const
Gets the special weapon type.
Definition: Armor.cpp:223
MovementType getMovementType() const
DO NOT USE THIS FUNCTION OUTSIDE THE BATTLEUNIT CONSTRUCTOR OR I WILL HUNT YOU DOWN.
Definition: Armor.cpp:245
ForcedTorso getForcedTorso() const
Checks if this armor ignores gender (power suit/flying suit).
Definition: Armor.cpp:326
int getUnderArmor() const
Gets the under armor level.
Definition: Armor.cpp:184
std::string getSpriteSheet() const
Gets the unit's sprite sheet.
Definition: Armor.cpp:139
int getDrawingRoutine() const
Gets the battlescape drawing routine ID.
Definition: Armor.cpp:232
int getRearArmor() const
Gets the rear armor level.
Definition: Armor.cpp:175
int getSideArmor() const
Gets the side armor level.
Definition: Armor.cpp:166
const std::vector< std::string > & getCorpseBattlescape() const
Gets the Battlescape corpse item.
Definition: Armor.cpp:204
int getDeathFrames() const
Gets number of death frames.
Definition: Armor.cpp:299
bool getConstantAnimation() const
Gets if armor uses constant animation.
Definition: Armor.cpp:308
std::string getCorpseGeoscape() const
Gets the Geoscape corpse item.
Definition: Armor.cpp:194
const UnitStats * getStats() const
Gets the armor's stats.
Definition: Armor.cpp:281
int getFrontArmor() const
Gets the front armor level.
Definition: Armor.cpp:157
float getDamageModifier(ItemDamageType dt) const
Gets damage modifier.
Definition: Armor.cpp:264
const std::vector< std::string > & getUnits() const
Gets the armor's units.
Definition: Armor.cpp:444
Represents a specific type of armor.
Definition: Armor.h:35
~Armor()
Cleans up the armor ruleset.
Definition: Armor.cpp:45
int getSize() const
Gets whether this is a normal or big unit.
Definition: Armor.cpp:254
This struct holds some plain unit attribute data together.
Definition: Unit.h:30
Armor(const std::string &type)
Creates a blank armor ruleset.
Definition: Armor.cpp:31
bool getCanHoldWeapon() const
Gets if armor can hold weapon.
Definition: Armor.cpp:317
int getRankColorGroup() const
Get rank base color.
Definition: Armor.cpp:362
int getWeight() const
Gets the armor's weight.
Definition: Armor.cpp:290
int getFaceColorGroup() const
Get face base color.
Definition: Armor.cpp:335
std::string getStoreItem() const
Gets the stores item.
Definition: Armor.cpp:214
int getHairColor(int i) const
Get hair base color.
Definition: Armor.cpp:387
int getRankColor(int i) const
Get rank base color.
Definition: Armor.cpp:419
void load(const YAML::Node &node)
Loads the armor data from YAML.
Definition: Armor.cpp:54
int getUtileColorGroup() const
Get utile base color.
Definition: Armor.cpp:353
int getUtileColor(int i) const
Get utile base color.
Definition: Armor.cpp:403
std::string getSpriteInventory() const
Gets the unit's inventory sprite.
Definition: Armor.cpp:148
Definition: BaseInfoState.cpp:40