mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 19:42:10 +00:00
Move cook result properly to ContentFeatures
This commit is contained in:
parent
f107967fdc
commit
37a5f8a30b
6 changed files with 19 additions and 29 deletions
|
@ -22,29 +22,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "content_mapnode.h"
|
||||
//#include "serverobject.h"
|
||||
#include "content_sao.h"
|
||||
|
||||
bool item_material_is_cookable(content_t content, IGameDef *gamedef)
|
||||
{
|
||||
if(content == CONTENT_TREE)
|
||||
return true;
|
||||
else if(content == CONTENT_COBBLE)
|
||||
return true;
|
||||
else if(content == CONTENT_SAND)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
InventoryItem* item_material_create_cook_result(content_t content,
|
||||
IGameDef *gamedef)
|
||||
{
|
||||
if(content == CONTENT_TREE)
|
||||
return new CraftItem(gamedef, "lump_of_coal", 1);
|
||||
else if(content == CONTENT_COBBLE)
|
||||
return new MaterialItem(gamedef, CONTENT_STONE, 1);
|
||||
else if(content == CONTENT_SAND)
|
||||
return new MaterialItem(gamedef, CONTENT_GLASS, 1);
|
||||
return NULL;
|
||||
}
|
||||
//#include "gamedef.h"
|
||||
//#include "nodedef.h"
|
||||
|
||||
std::string item_craft_get_image_name(const std::string &subname,
|
||||
IGameDef *gamedef)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue