summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-06-02 11:01:28 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-06-03 22:31:01 +0300
commit3899f83da879e11cf531c88514772b890d060721 (patch)
tree2fa3533bf454568f6cdd2560b24ade78776a3837 /src/inventory.cpp
parent5f3c70061deea330a23be33164a34f675721d452 (diff)
downloadminetest-3899f83da879e11cf531c88514772b890d060721.tar.gz
minetest-3899f83da879e11cf531c88514772b890d060721.tar.bz2
minetest-3899f83da879e11cf531c88514772b890d060721.zip
NodeMetaRef:{to,from}_table and lua_api.txt additions
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 3d6707f60..df75ebcd5 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -915,6 +915,17 @@ InventoryList * Inventory::getList(const std::string &name)
return m_lists[i];
}
+std::vector<const InventoryList*> Inventory::getLists()
+{
+ std::vector<const InventoryList*> lists;
+ for(u32 i=0; i<m_lists.size(); i++)
+ {
+ InventoryList *list = m_lists[i];
+ lists.push_back(list);
+ }
+ return lists;
+}
+
bool Inventory::deleteList(const std::string &name)
{
s32 i = getListIndex(name);