Remove GetProperty macro, as it wasn't that intuitive, and caused issues later.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
#include <vector>
|
||||
#include "../../Core/Random.hpp"
|
||||
#include "../../Core/StatisticSet.hpp"
|
||||
#include "../../GenericTemplates.hpp"
|
||||
#include "CreatureMoves.hpp"
|
||||
#include "LearnableAttacks.hpp"
|
||||
|
||||
@@ -14,10 +13,11 @@ namespace CreatureLib::Library {
|
||||
\brief A single species can have more than one variant. This class holds the data for those variants.
|
||||
*/
|
||||
class SpeciesVariant {
|
||||
GetProperty(std::string, Name);
|
||||
GetProperty(float, Height);
|
||||
GetProperty(float, Weight);
|
||||
GetProperty(uint32_t, BaseExperience);
|
||||
protected:
|
||||
std::string _name;
|
||||
float _height;
|
||||
float _weight;
|
||||
uint32_t _baseExperience;
|
||||
|
||||
private:
|
||||
std::vector<uint8_t> _types;
|
||||
@@ -34,6 +34,11 @@ namespace CreatureLib::Library {
|
||||
|
||||
~SpeciesVariant();
|
||||
|
||||
inline const std::string& GetName() const { return _name; }
|
||||
inline float GetHeight() const { return _height; }
|
||||
inline float GetWeight() const { return _weight; }
|
||||
inline uint32_t GetBaseExperience() const { return _baseExperience; }
|
||||
|
||||
[[nodiscard]] size_t GetTypeCount() const;
|
||||
[[nodiscard]] uint8_t GetType(size_t index) const;
|
||||
[[nodiscard]] const std::vector<uint8_t>& GetTypes() const;
|
||||
|
||||
Reference in New Issue
Block a user