summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 2988232..6f69cad 100644
--- a/init.lua
+++ b/init.lua
@@ -82,6 +82,9 @@ minetest.register_entity(":__builtin:item", {
if not time then
time = 300
end
+ if not self.timer then
+ self.timer = 0
+ end
self.timer = self.timer + dtime
if (self.timer > time) then
self.object:remove()