From 8a0ee8d414338ad89c5983a3fccaf2967f0b13c3 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 13 Sep 2018 22:43:00 +0200 Subject: [PATCH] Faster item spawn check --- mods/tutorial/init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mods/tutorial/init.lua b/mods/tutorial/init.lua index 931f4c0..6be2564 100644 --- a/mods/tutorial/init.lua +++ b/mods/tutorial/init.lua @@ -1134,19 +1134,21 @@ minetest.register_node("tutorial:itemspawner", { end end end + else + return end spawned = meta:get_int("spawned") if spawned ~= 1 then if itemstring ~= nil and itemstring ~= "" then minetest.add_item(spawnpos, itemstring) local timer = minetest.get_node_timer(pos) - timer:start(5) + timer:start(1) return end end local timer = minetest.get_node_timer(pos) - timer:start(5) + timer:start(1) end, })