aboutsummaryrefslogtreecommitdiff
path: root/src/mineral.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mineral.cpp')
-rw-r--r--src/mineral.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mineral.cpp b/src/mineral.cpp
index 038251fa3..4e495fce6 100644
--- a/src/mineral.cpp
+++ b/src/mineral.cpp
@@ -18,6 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
*/
#include "mineral.h"
+#include "gamedef.h"
const char *mineral_filenames[MINERAL_COUNT] =
@@ -47,5 +48,15 @@ std::string mineral_block_texture(u8 mineral)
return mineral_textures[mineral];
}
+ItemStack getDiggedMineralItem(u8 mineral, IGameDef *gamedef)
+{
+ if(mineral == MINERAL_COAL)
+ return ItemStack("default:coal_lump", 1, 0, "", gamedef->idef());
+ else if(mineral == MINERAL_IRON)
+ return ItemStack("default:iron_lump", 1, 0, "", gamedef->idef());
+ else
+ return ItemStack();
+}
+