refactor InventoryView & add 'uses' item property (WIP)

This commit is contained in:
MihailRis
2025-02-16 20:41:13 +03:00
parent a118016c8f
commit 231fc7e0d0
5 changed files with 152 additions and 73 deletions
+8
View File
@@ -28,10 +28,18 @@ struct ItemDef {
dv::value properties = nullptr;
/// @brief Item max stack size
itemcount_t stackSize = 64;
/// @brief Item is generated for other content unit (like block)
bool generated = false;
/// @brief Item light emission [r, g, b] where r,g,b in range [0..15]
uint8_t emission[4] {0, 0, 0, 0};
/// @brief Default item uses count
int16_t uses = 100;
ItemIconType iconType = ItemIconType::SPRITE;
std::string icon = "blocks:notfound";