inventory regions, minor refactor

This commit is contained in:
MihailRis
2024-01-31 00:14:43 +03:00
parent a57fba4fa4
commit 49fdcdfb27
29 changed files with 259 additions and 160 deletions
+6 -2
View File
@@ -13,11 +13,11 @@
class ContentLUT;
class ContentIndices;
// TODO: items indices fix
class Inventory : Serializable {
uint id;
std::vector<ItemStack> slots;
public:
Inventory(size_t size);
Inventory(uint id, size_t size);
ItemStack& getSlot(size_t index);
size_t findEmptySlot(size_t begin=0, size_t end=-1) const;
@@ -40,6 +40,10 @@ public:
static void convert(dynamic::Map* data, const ContentLUT* lut);
inline uint getId() const {
return id;
}
static const size_t npos;
};