From 6a76c226e10e92c3e3339096f07f8ab065e2098b Mon Sep 17 00:00:00 2001 From: Kahrl Date: Thu, 12 Jan 2012 06:10:39 +0100 Subject: The huge item definition and item namespace unification patch (itemdef), see http://c55.me/minetest/wiki/doku.php?id=changes:itemdef --- src/mineral.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/mineral.cpp') 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(); +} + -- cgit v1.2.3