mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-12 16:58:39 +00:00
CraftItem rework and Lua interface
This commit is contained in:
parent
1c19f959db
commit
d6b30dd3a5
21 changed files with 2162 additions and 1250 deletions
|
@ -251,24 +251,6 @@ void ItemSAO::punch(ServerActiveObject *puncher)
|
|||
delete item;
|
||||
}
|
||||
|
||||
void ItemSAO::rightClick(ServerActiveObject *clicker)
|
||||
{
|
||||
infostream<<__FUNCTION_NAME<<std::endl;
|
||||
InventoryItem *item = createInventoryItem();
|
||||
if(item == NULL)
|
||||
return;
|
||||
|
||||
bool to_be_deleted = item->use(m_env, clicker);
|
||||
|
||||
if(to_be_deleted)
|
||||
m_removed = true;
|
||||
else
|
||||
// Reflect changes to the item here
|
||||
m_inventorystring = item->getItemString();
|
||||
|
||||
delete item; // Delete temporary item
|
||||
}
|
||||
|
||||
/*
|
||||
RatSAO
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue