diff options
Diffstat (limited to 'src/core/item.h')
-rw-r--r-- | src/core/item.h | 43 |
1 files changed, 33 insertions, 10 deletions
diff --git a/src/core/item.h b/src/core/item.h index 68b6876..d390c2d 100644 --- a/src/core/item.h +++ b/src/core/item.h @@ -11,22 +11,45 @@ namespace core { -class Item +/** + * @brief a class of items + * Examples are armor, cannons, commodities... + */ +class ItemClass { public: - Item(const unsigned int itemclass, const unsigned int itemtype, const char *infolabel); - ~Item(); + ItemClass(const char *label); - inline const unsigned int itemclass() const { return item_class; } - inline const unsigned int itemtype() const { return item_type; } - + inline const std::string &label() { return itemclass_label; } + + inline const std::string &name() { return itemclass_name; } + +private: + std::string itemclass_label; + std::string itemclass_name; +}; + +/** + * @brief a specific type of item in the game + * Examples are tritanium hull armor, ion cannon, gems + */ +class ItemType +{ +public: + ItemType(const char *label); + + inline const std::string &label() { return itemtype_label; } + + inline const std::string &name() { return itemtype_name; } + + inline const float base_price() { return itemtype_baseprice; } private: - unsigned int item_class; - unsigned int item_type; - float item_amount; + std::string itemtype_label; + std::string itemtype_name; - std::string item_infolabel; + ItemClass *itemtype_class; + float itemtype_baseprice; }; } |