mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
fix: actual block inventory size not updating on inventory-size property update
This commit is contained in:
parent
352ef6485a
commit
1ba5b0ce33
3 changed files with 25 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue