summaryrefslogtreecommitdiff
path: root/tomato.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 /tomato.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 'tomato.lua')
-rw-r--r--tomato.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/tomato.lua b/tomato.lua
index 72b3638..4fdb216 100644
--- a/tomato.lua
+++ b/tomato.lua
@@ -123,8 +123,8 @@ minetest.register_craft({
minetest.register_abm({
nodenames = { "crops:tomato_plant_1", "crops:tomato_plant_2", "crops:tomato_plant_3" },
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
@@ -143,8 +143,8 @@ minetest.register_abm({
minetest.register_abm({
nodenames = { "crops:tomato_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