1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Log player dropping items

This commit is contained in:
1F616EMO 2024-07-17 08:22:04 +08:00
parent 8e59d8b682
commit 35a0b9e9f6
No known key found for this signature in database
GPG key ID: EF52EFA8E05859B2

View file

@ -376,6 +376,9 @@ function core.item_drop(itemstack, dropper, pos)
dir.z = dir.z * 2.9
obj:set_velocity(dir)
obj:get_luaentity().dropped_by = dropper:get_player_name()
core.log("action", dropper:get_player_name() .. " dropped " ..
item:to_string() .. " at " .. core.pos_to_string(p, 1))
end
return itemstack
end