Update inventory texture too
[oweals/minetest.git] / src / nodedef.h
index dece63fcd90a7645bb26939ffab2af3153c501b3..a093cb7998527dabe9a34724041311efd75acaf8 100644 (file)
@@ -113,6 +113,7 @@ struct ContentFeatures
        */
        TileSpec tiles[6];
        
+       std::string inventory_texture_name;
        video::ITexture *inventory_texture;
 
        // Used currently for flowing liquids
@@ -122,6 +123,9 @@ struct ContentFeatures
        // Special irrlicht material, used sometimes
        video::SMaterial *special_material;
        video::SMaterial *special_material2;
+       // Currently used for fetching liquid texture coordinates
+       // - This is also updated to the above two (if they are non-NULL)
+       //   when textures are updated
        AtlasPointer *special_atlas;
 #endif
 
@@ -320,6 +324,12 @@ public:
        // Register node definition
        virtual void set(content_t c, const ContentFeatures &def)=0;
        virtual ContentFeatures* getModifiable(content_t c)=0;
+
+       /*
+               Update tile textures to latest return values of TextueSource.
+               Call after updating the texture atlas of a TextureSource.
+       */
+       virtual void updateTextures(ITextureSource *tsrc)=0;
 };
 
 // If textures not actually available (server), tsrc can be NULL