blocks and items 'caption' property

This commit is contained in:
MihailRis
2024-03-12 16:59:34 +03:00
parent c9da6b9a0c
commit 5c3b61265a
10 changed files with 44 additions and 1 deletions
+2
View File
@@ -1,4 +1,6 @@
#include "ItemDef.h"
#include "../util/stringutil.h"
ItemDef::ItemDef(std::string name) : name(name) {
caption = util::id_to_caption(name);
}
+4
View File
@@ -21,8 +21,12 @@ enum class item_icon_type {
class ItemDef {
public:
/// @brief Item string id (with prefix included)
std::string const name;
/// @brief Item name will shown in inventory
std::string caption;
itemcount_t stackSize = 64;
bool generated = false;
uint8_t emission[4] {0, 0, 0, 0};