Improve glass
[oweals/minetest.git] / src / inventory.cpp
index 4ac2453ded127e9d281883872fb1be6b8da69f42..1929761a58213897a00fa4637f08df0784f4c6af 100644 (file)
@@ -29,8 +29,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "content_sao.h"
 #include "player.h"
 #include "log.h"
-#include "mapnode_contentfeatures.h"
-#include "tool.h"
+#include "nodedef.h"
+#include "tooldef.h"
 #include "gamedef.h"
 
 /*
@@ -152,7 +152,7 @@ ServerActiveObject* InventoryItem::createSAO(ServerEnvironment *env, u16 id, v3f
 #ifndef SERVER
 video::ITexture * MaterialItem::getImage(ITextureSource *tsrc) const
 {
-       return content_features(m_content).inventory_texture;
+       return m_gamedef->getNodeDefManager()->get(m_content).inventory_texture;
 }
 #endif
 
@@ -800,6 +800,28 @@ static std::string describeC(const struct InventoryContext *c)
                return std::string("current_player=") + c->current_player->getName();
 }
 
+IMoveAction::IMoveAction(std::istream &is)
+{
+       std::string ts;
+
+       std::getline(is, ts, ' ');
+       count = stoi(ts);
+
+       std::getline(is, from_inv, ' ');
+
+       std::getline(is, from_list, ' ');
+
+       std::getline(is, ts, ' ');
+       from_i = stoi(ts);
+
+       std::getline(is, to_inv, ' ');
+
+       std::getline(is, to_list, ' ');
+
+       std::getline(is, ts, ' ');
+       to_i = stoi(ts);
+}
+
 void IMoveAction::apply(InventoryContext *c, InventoryManager *mgr)
 {
        Inventory *inv_from = mgr->getInventory(c, from_inv);