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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user