1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 00:25:19 +02:00

The huge item definition and item namespace unification patch (itemdef), see http://c55.me/minetest/wiki/doku.php?id=changes:itemdef

This commit is contained in:
Kahrl
2012-01-12 06:10:39 +01:00
parent 569156b013
commit 6a76c226e1
65 changed files with 7232 additions and 7282 deletions

View File

@@ -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();
}