-public:
- InventoryItem(IGameDef *gamedef, u16 count);
- virtual ~InventoryItem();
-
- static InventoryItem* deSerialize(std::istream &is, IGameDef *gamedef);
-
- virtual const char* getName() const = 0;
- // Shall write the name and the parameters
- virtual void serialize(std::ostream &os) const = 0;
- // Shall make an exact clone of the item
- virtual InventoryItem* clone() = 0;
- // Return the name of the image for this item
- virtual std::string getImageBasename() const { return ""; }
-#ifndef SERVER
- // Shall return an image of the item (or NULL)
- virtual video::ITexture * getImage() const
- { return NULL; }
- // Shall return an image of the item without embellishments (or NULL)
- virtual video::ITexture * getImageRaw() const
- { return getImage(); }
-#endif
- // Shall return a text to show in the GUI
- virtual std::string getText() { return ""; }
- // Returns the string used for inventory
- virtual std::string getItemString();
- // Creates an object from the item, to be placed in the world.
- virtual ServerActiveObject* createSAO(ServerEnvironment *env, u16 id, v3f pos);
- // Gets amount of items that dropping one SAO will decrement
- virtual u16 getDropCount() const { return getCount(); }