fix: actual block inventory size not updating on inventory-size property update

This commit is contained in:
MihailRis
2024-11-17 16:58:58 +03:00
parent 352ef6485a
commit 1ba5b0ce33
3 changed files with 25 additions and 3 deletions
+4
View File
@@ -45,6 +45,10 @@ void Inventory::move(
}
}
void Inventory::resize(uint newSize) {
slots.resize(newSize);
}
void Inventory::deserialize(const dv::value& src) {
id = src["id"].asInteger(1);
auto& slotsarr = src["slots"];