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;
45 MovementType _movementType;
47 float _damageModifier[DAMAGE_TYPES];
48 std::vector<int> _loftempsSet;
51 bool _constantAnimation, _canHoldWeapon, _hasInventory;
52 ForcedTorso _forcedTorso;
53 int _faceColorGroup, _hairColorGroup, _utileColorGroup, _rankColorGroup;
54 std::vector<int> _faceColor, _hairColor, _utileColor, _rankColor;
55 std::vector<std::string> _units;
58 Armor(
const std::string &type);
62 void load(
const YAML::Node& node);
128 const std::vector<std::string> &
getUnits()
const;
bool hasInventory() const
Can we access this unit's inventory?
Definition: Armor.cpp:439
std::string getType() const
Gets the armor's type.
Definition: Armor.cpp:125
bool drawBubbles() const
Gets whether or not to draw bubbles (breathing animation).
Definition: Armor.cpp:236
int getFaceColor(int i) const
Get face base color.
Definition: Armor.cpp:375
int getHairColorGroup() const
Get hair base color.
Definition: Armor.cpp:348
const std::vector< int > & getLoftempsSet() const
Gets loftempSet.
Definition: Armor.cpp:276
std::string getSpecialWeapon() const
Gets the special weapon type.
Definition: Armor.cpp:218
MovementType getMovementType() const
DO NOT USE THIS FUNCTION OUTSIDE THE BATTLEUNIT CONSTRUCTOR OR I WILL HUNT YOU DOWN.
Definition: Armor.cpp:249
ForcedTorso getForcedTorso() const
Checks if this armor ignores gender (power suit/flying suit).
Definition: Armor.cpp:330
int getUnderArmor() const
Gets the under armor level.
Definition: Armor.cpp:179
std::string getSpriteSheet() const
Gets the unit's sprite sheet.
Definition: Armor.cpp:134
int getDrawingRoutine() const
Gets the battlescape drawing routine ID.
Definition: Armor.cpp:227
int getRearArmor() const
Gets the rear armor level.
Definition: Armor.cpp:170
int getSideArmor() const
Gets the side armor level.
Definition: Armor.cpp:161
const std::vector< std::string > & getCorpseBattlescape() const
Gets the Battlescape corpse item.
Definition: Armor.cpp:199
int getDeathFrames() const
Gets number of death frames.
Definition: Armor.cpp:303
bool getConstantAnimation() const
Gets if armor uses constant animation.
Definition: Armor.cpp:312
std::string getCorpseGeoscape() const
Gets the Geoscape corpse item.
Definition: Armor.cpp:189
const UnitStats * getStats() const
Gets the armor's stats.
Definition: Armor.cpp:285
int getFrontArmor() const
Gets the front armor level.
Definition: Armor.cpp:152
float getDamageModifier(ItemDamageType dt) const
Gets damage modifier.
Definition: Armor.cpp:268
const std::vector< std::string > & getUnits() const
Gets the armor's units.
Definition: Armor.cpp:448
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:258
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:321
int getRankColorGroup() const
Get rank base color.
Definition: Armor.cpp:366
int getWeight() const
Gets the armor's weight.
Definition: Armor.cpp:294
int getFaceColorGroup() const
Get face base color.
Definition: Armor.cpp:339
std::string getStoreItem() const
Gets the stores item.
Definition: Armor.cpp:209
int getHairColor(int i) const
Get hair base color.
Definition: Armor.cpp:391
int getRankColor(int i) const
Get rank base color.
Definition: Armor.cpp:423
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:357
int getUtileColor(int i) const
Get utile base color.
Definition: Armor.cpp:407
std::string getSpriteInventory() const
Gets the unit's inventory sprite.
Definition: Armor.cpp:143
Definition: BaseInfoState.cpp:40