mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 09:25:37 +02:00
Add get_wielded_item
This commit is contained in:
@@ -364,7 +364,7 @@ int ObjectRef::l_set_wielded_item(lua_State *L)
|
||||
ServerActiveObject *co = getobject(ref);
|
||||
if (co == NULL) return 0;
|
||||
// Do it
|
||||
ItemStack item = read_item(L, 2, getServer(L));
|
||||
ItemStack item = read_item(L, 2, getServer(L)->idef());
|
||||
bool success = co->setWieldedItem(item);
|
||||
if (success && co->getType() == ACTIVEOBJECT_TYPE_PLAYER) {
|
||||
getServer(L)->SendInventory(((PlayerSAO*)co));
|
||||
|
Reference in New Issue
Block a user