]> git.lizzy.rs Git - minetest.git/blobdiff - src/mineral.h
Properly use time_from_last_punch for limiting PvP punch damage
[minetest.git] / src / mineral.h
index aa0902e122b8dc1ba6a69cbbfff4c39e9563c33d..4949fe07ec42cbc6ecd5a15de21ffb06f6e7b1d8 100644 (file)
@@ -21,8 +21,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #define MINERAL_HEADER
 
 #include "inventory.h"
-#include "texture.h"
-#include "irrlichtwrapper.h"
 
 /*
        Minerals
@@ -32,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 // Caches textures
-void init_mineral(IrrlichtWrapper *irrlicht);
+void init_mineral();
 
 #define MINERAL_NONE 0
 #define MINERAL_COAL 1
@@ -40,14 +38,16 @@ void init_mineral(IrrlichtWrapper *irrlicht);
 
 #define MINERAL_COUNT 3
 
-textureid_t mineral_block_texture(u8 mineral);
+std::string mineral_block_texture(u8 mineral);
 
-inline CraftItem * getDiggedMineralItem(u8 mineral)
+class IGameDef;
+
+inline CraftItem * getDiggedMineralItem(u8 mineral, IGameDef *gamedef)
 {
        if(mineral == MINERAL_COAL)
-               return new CraftItem("lump_of_coal", 1);
+               return new CraftItem(gamedef, "lump_of_coal", 1);
        else if(mineral == MINERAL_IRON)
-               return new CraftItem("lump_of_iron", 1);
+               return new CraftItem(gamedef, "lump_of_iron", 1);
 
        return NULL;
 }