Faster item spawn check
This commit is contained in:
parent
38cbf84ce6
commit
8a0ee8d414
@ -1134,19 +1134,21 @@ minetest.register_node("tutorial:itemspawner", {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
return
|
||||||
end
|
end
|
||||||
spawned = meta:get_int("spawned")
|
spawned = meta:get_int("spawned")
|
||||||
if spawned ~= 1 then
|
if spawned ~= 1 then
|
||||||
if itemstring ~= nil and itemstring ~= "" then
|
if itemstring ~= nil and itemstring ~= "" then
|
||||||
minetest.add_item(spawnpos, itemstring)
|
minetest.add_item(spawnpos, itemstring)
|
||||||
local timer = minetest.get_node_timer(pos)
|
local timer = minetest.get_node_timer(pos)
|
||||||
timer:start(5)
|
timer:start(1)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local timer = minetest.get_node_timer(pos)
|
local timer = minetest.get_node_timer(pos)
|
||||||
timer:start(5)
|
timer:start(1)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user