mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-12 16:58:39 +00:00
Inventory: Make addList() consistent (#11382)
Fixes list clearing for inv:set_list() using same size, since 2db6b07
.
addList() now clears the list in all cases. Use setSize() to resize without clearing.
This commit is contained in:
parent
72927b73ca
commit
f2fd443262
3 changed files with 9 additions and 12 deletions
|
@ -298,7 +298,7 @@ public:
|
|||
void serialize(std::ostream &os, bool incremental = false) const;
|
||||
void deSerialize(std::istream &is);
|
||||
|
||||
// Adds a new list or clears and resizes an existing one
|
||||
// Creates a new list if none exists or truncates existing lists
|
||||
InventoryList * addList(const std::string &name, u32 size);
|
||||
InventoryList * getList(const std::string &name);
|
||||
const InventoryList * getList(const std::string &name) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue