summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--corn.lua4
-rw-r--r--init.lua3
-rw-r--r--melon.lua4
-rw-r--r--tomato.lua4
4 files changed, 9 insertions, 6 deletions
diff --git a/corn.lua b/corn.lua
index 13e048b..6f21055 100644
--- a/corn.lua
+++ b/corn.lua
@@ -10,8 +10,8 @@ of the license, or (at your option) any later version.
--]]
-local interval = 90
-local chance = 2
+local interval = crops_interval
+local chance = crops_chance
minetest.register_node("crops:corn", {
description = "corn",
diff --git a/init.lua b/init.lua
index bd749bc..38c098f 100644
--- a/init.lua
+++ b/init.lua
@@ -10,6 +10,9 @@ of the license, or (at your option) any later version.
--]]
+local crops_interval = 30
+local crops_chance = 8
+
dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/melon.lua")
dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/corn.lua")
dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/tomato.lua")
diff --git a/melon.lua b/melon.lua
index 3f01fe8..27522de 100644
--- a/melon.lua
+++ b/melon.lua
@@ -17,8 +17,8 @@ local faces = {
[4] = { x = 0, z = 1, r = 0, o = 2, m = 11 }
}
-local interval = 90
-local chance = 2
+local interval = crops_interval
+local chance = crops_chance
minetest.register_node("crops:melon_seed", {
description = "melon seed",
diff --git a/tomato.lua b/tomato.lua
index d34f58f..5314558 100644
--- a/tomato.lua
+++ b/tomato.lua
@@ -10,8 +10,8 @@ of the license, or (at your option) any later version.
--]]
-local interval = 90
-local chance = 2
+local interval = crops_interval
+local chance = crops_chance
minetest.register_node("crops:tomato_seed", {
description = "tomato seed",