From de7cd62f17c30ad1e2ca4059c060c8900dfe1d84 Mon Sep 17 00:00:00 2001 From: AntumDeluge Date: Sat, 13 May 2017 03:45:04 -0700 Subject: [PATCH] Run spawn function every 20 minutes --- spawn.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spawn.lua b/spawn.lua index 1e66db9..ffecbe0 100644 --- a/spawn.lua +++ b/spawn.lua @@ -1,7 +1,13 @@ + +local time_sec = 1 +local time_min = time_sec * 60 +local time_hr = time_min * 60 +local time_day = time_hr * 24 + minetest.register_abm({ nodenames = {"default:dirt_with_grass","default:stone"}, neighbors = {"air"}, - interval = 30, + interval = time_min * 20, -- Run spawn function every 20 minutes chance = 9000, action = function(pos, node, _, active_object_count_wider) if active_object_count_wider > 5 then