summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-04-11 21:28:04 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-04-11 21:28:04 +0300
commit249c0dc68a107878b7aaca0c8d2dcc3e08862430 (patch)
tree734bb0c1aee5c81d8a4eaa3b9e8efdc179041d21 /src/inventory.cpp
parent81ac026e1f04f1c40eb246e21e9aac25c8ec8f92 (diff)
downloadminetest-249c0dc68a107878b7aaca0c8d2dcc3e08862430.tar.gz
minetest-249c0dc68a107878b7aaca0c8d2dcc3e08862430.tar.bz2
minetest-249c0dc68a107878b7aaca0c8d2dcc3e08862430.zip
Fixed some problems with crafting and inventory
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index b14828ae2..b6560063f 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -278,6 +278,7 @@ InventoryList::InventoryList(std::string name, u32 size)
m_name = name;
m_size = size;
clearItems();
+ //m_dirty = false;
}
InventoryList::~InventoryList()
@@ -303,6 +304,8 @@ void InventoryList::clearItems()
{
m_items.push_back(NULL);
}
+
+ //setDirty(true);
}
void InventoryList::serialize(std::ostream &os)
@@ -396,6 +399,7 @@ InventoryList & InventoryList::operator = (const InventoryList &other)
m_items[i] = item->clone();
}
}
+ //setDirty(true);
return *this;
}
@@ -440,6 +444,7 @@ InventoryItem * InventoryList::changeItem(u32 i, InventoryItem *newitem)
InventoryItem *olditem = m_items[i];
m_items[i] = newitem;
+ //setDirty(true);
return olditem;
}
@@ -493,6 +498,8 @@ InventoryItem * InventoryList::addItem(u32 i, InventoryItem *newitem)
if(newitem == NULL)
return NULL;
+ //setDirty(true);
+
// If it is an empty position, it's an easy job.
InventoryItem *to_item = m_items[i];
if(to_item == NULL)
@@ -549,6 +556,8 @@ InventoryItem * InventoryList::takeItem(u32 i, u32 count)
{
if(count == 0)
return NULL;
+
+ //setDirty(true);
InventoryItem *item = m_items[i];
// If it is an empty position, return NULL