]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/inventory.h
Move ContentFeatures to mapnode_contentfeatures.{h,cpp} and clean stuff
[dragonfireclient.git] / src / inventory.h
index 490cab73ef9eb239ae43241cbdf0954c998b0ea6..c202d5533125c860dbf15030c2da54840f592ec3 100644 (file)
@@ -36,7 +36,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 class ServerActiveObject;
 class ServerEnvironment;
-class Player;
 
 class InventoryItem
 {
@@ -117,7 +116,7 @@ class InventoryItem
        // Called when item is right-clicked when lying on ground.
        // If returns true, item shall be deleted.
        virtual bool use(ServerEnvironment *env,
-                       Player *player){return false;}
+                       ServerActiveObject *user){return false;}
 
 protected:
        u16 m_count;
@@ -152,10 +151,7 @@ class MaterialItem : public InventoryItem
                return new MaterialItem(m_content, m_count);
        }
 #ifndef SERVER
-       video::ITexture * getImage() const
-       {
-               return content_features(m_content).inventory_texture;
-       }
+       video::ITexture * getImage() const;
 #endif
        std::string getText()
        {
@@ -263,7 +259,7 @@ class CraftItem : public InventoryItem
        bool isCookable() const;
        InventoryItem *createCookResult() const;
 
-       bool use(ServerEnvironment *env, Player *player);
+       bool use(ServerEnvironment *env, ServerActiveObject *user);
        
        /*
                Special methods