aboutsummaryrefslogtreecommitdiff
path: root/builtin/game/item_entity.lua
diff options
context:
space:
mode:
authorRobert Zenz <Robert.Zenz@bonsaimind.org>2015-11-05 19:56:19 +0100
committerest31 <MTest31@outlook.com>2015-11-12 00:47:11 +0100
commit0876623aedcd93100103d145788affcb5001bdaf (patch)
tree5d7686e5cd9ba764034361070e3db1a0b53050f9 /builtin/game/item_entity.lua
parent76c9abe4c89f6c8170b82558182837259efdd2ea (diff)
downloadminetest-0876623aedcd93100103d145788affcb5001bdaf.tar.gz
minetest-0876623aedcd93100103d145788affcb5001bdaf.tar.bz2
minetest-0876623aedcd93100103d145788affcb5001bdaf.zip
Add the player name to dropped items
The player name is now added in the field "dropped_by" on the created entity.
Diffstat (limited to 'builtin/game/item_entity.lua')
-rw-r--r--builtin/game/item_entity.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/game/item_entity.lua b/builtin/game/item_entity.lua
index a8d7a1863..be158c119 100644
--- a/builtin/game/item_entity.lua
+++ b/builtin/game/item_entity.lua
@@ -74,7 +74,8 @@ core.register_entity(":__builtin:item", {
return core.serialize({
itemstring = self.itemstring,
always_collect = self.always_collect,
- age = self.age
+ age = self.age,
+ dropped_by = self.dropped_by
})
end,
@@ -89,6 +90,7 @@ core.register_entity(":__builtin:item", {
else
self.age = dtime_s
end
+ self.dropped_by = data.dropped_by
end
else
self.itemstring = staticdata