summaryrefslogtreecommitdiff
path: root/item_drop
diff options
context:
space:
mode:
authorRealBadAngel <mk@realbadangel.pl>2013-04-15 08:33:01 +0200
committerRealBadAngel <mk@realbadangel.pl>2013-04-15 08:33:01 +0200
commit595ed5045171ac45c92551e093fe582e0ca2508e (patch)
tree93dd1c4d7a8af8c41dc4c5e056d5004f31358891 /item_drop
parent642b8bec16ef56a6be1a5abbffb50f479b0fdb1b (diff)
avoid nil
Diffstat (limited to 'item_drop')
-rw-r--r--item_drop/init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/item_drop/init.lua b/item_drop/init.lua
index 8cd3b14..f51469b 100644
--- a/item_drop/init.lua
+++ b/item_drop/init.lua
@@ -8,7 +8,7 @@ minetest.register_globalstep(function(dtime)
for _,object in ipairs(minetest.env:get_objects_inside_radius(pos, 1)) do
if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "__builtin:item" then
if inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then
- if object:get_luaentity().timer > time_pick then
+ if object:get_luaentity() and object:get_luaentity().timer > time_pick then
inv:add_item("main", ItemStack(object:get_luaentity().itemstring))
if object:get_luaentity().itemstring ~= "" then
minetest.sound_play("item_drop_pickup", {
@@ -137,4 +137,4 @@ minetest.register_on_dieplayer(function(name, pos)
end
end)
]]--
-print("DROPS LOADED!") \ No newline at end of file
+print("DROPS LOADED!")