mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-19 11:15:18 +02:00
Create framework for getting rid of global definitions of node/tool/item/whatever types
This commit is contained in:
@@ -40,12 +40,14 @@ void init_mineral();
|
||||
|
||||
std::string mineral_block_texture(u8 mineral);
|
||||
|
||||
inline CraftItem * getDiggedMineralItem(u8 mineral)
|
||||
class IGameDef;
|
||||
|
||||
inline CraftItem * getDiggedMineralItem(u8 mineral, IGameDef *gamedef)
|
||||
{
|
||||
if(mineral == MINERAL_COAL)
|
||||
return new CraftItem("lump_of_coal", 1);
|
||||
return new CraftItem(gamedef, "lump_of_coal", 1);
|
||||
else if(mineral == MINERAL_IRON)
|
||||
return new CraftItem("lump_of_iron", 1);
|
||||
return new CraftItem(gamedef, "lump_of_iron", 1);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user