summaryrefslogtreecommitdiff
path: root/melon.lua
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2015-05-06 23:59:25 -0700
committerAuke Kok <auke-jan.h.kok@intel.com>2015-05-06 23:59:25 -0700
commita1be5250b80f1dd7b0b3b9c59611cdb0c0bf57a7 (patch)
treeeb0fc2f554bfdf15bf7d113b1757b449ec8ad2df /melon.lua
parent59d53aa5a63a5b36867c2ea592ca4005f9859fe2 (diff)
Unify the difficulty settings into init.lua
All the scaling factors are now either in the plant table or the crops.settings table. This makes end-user tuning a bit harder, but switching easier and configuring easier as well.
Diffstat (limited to 'melon.lua')
-rw-r--r--melon.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/melon.lua b/melon.lua
index 79b93d9..a07c1bf 100644
--- a/melon.lua
+++ b/melon.lua
@@ -140,8 +140,8 @@ minetest.register_node("crops:melon", {
minetest.register_abm({
nodenames = { "crops:melon_plant_1", "crops:melon_plant_2", "crops:melon_plant_3","crops:melon_plant_4" },
neighbors = { "group:soil" },
- interval = crops.interval,
- chance = crops.chance,
+ interval = crops.settings.interval,
+ chance = crops.settings.chance,
action = function(pos, node, active_object_count, active_object_count_wider)
if not crops.can_grow(pos) then
return
@@ -161,8 +161,8 @@ minetest.register_abm({
minetest.register_abm({
nodenames = { "crops:melon_plant_5" },
neighbors = { "group:soil" },
- interval = crops.interval,
- chance = crops.chance,
+ interval = crops.settings.interval,
+ chance = crops.settings.chance,
action = function(pos, node, active_object_count, active_object_count_wider)
if not crops.can_grow(pos) then
return
@@ -207,7 +207,7 @@ minetest.register_abm({
--
minetest.register_abm({
nodenames = { "crops:melon_plant_5_attached" },
- interval = crops.interval,
+ interval = crops.settings.interval,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
for face = 1, 4 do