class ServerActiveObject;
class ServerEnvironment;
-class Player;
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;
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()
{
bool isCookable() const;
InventoryItem *createCookResult() const;
- bool use(ServerEnvironment *env, Player *player);
+ bool use(ServerEnvironment *env, ServerActiveObject *user);
/*
Special methods