fix: actual block inventory size not updating on inventory-size property update
This commit is contained in:
@@ -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"];
|
||||
|
||||
@@ -35,6 +35,8 @@ public:
|
||||
size_t end = -1
|
||||
);
|
||||
|
||||
void resize(uint newSize);
|
||||
|
||||
void deserialize(const dv::value& src) override;
|
||||
|
||||
dv::value serialize() const override;
|
||||
|
||||
Reference in New Issue
Block a user