diff options
author | Kahrl <kahrl@gmx.net> | 2012-01-12 06:10:39 +0100 |
---|---|---|
committer | Kahrl <kahrl@gmx.net> | 2012-01-12 06:10:39 +0100 |
commit | 6a76c226e10e92c3e3339096f07f8ab065e2098b (patch) | |
tree | 396d9083f5f76ebb5ba96df113ba68046c2487df /src/mineral.cpp | |
parent | 569156b01302ea4ba45d11ff5524b62dbc6a9aa0 (diff) | |
download | hax-minetest-server-6a76c226e10e92c3e3339096f07f8ab065e2098b.tar.gz hax-minetest-server-6a76c226e10e92c3e3339096f07f8ab065e2098b.zip |
The huge item definition and item namespace unification patch (itemdef), see http://c55.me/minetest/wiki/doku.php?id=changes:itemdef
Diffstat (limited to 'src/mineral.cpp')
-rw-r--r-- | src/mineral.cpp | 11 |
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(); +} + |