summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2018-05-17 09:25:16 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2018-05-17 09:25:16 +0100
commit6e52f967038bc1676723619141f6f936ca11165a (patch)
tree6f9e4c38694eb499ba183b42a97360aea70aa225 /init.lua
parent82104e68a7fe06e8c441b22dc6f0af3ac0cd9fc0 (diff)
add api.txt and tidy code
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/init.lua b/init.lua
index 33a9ca7..fa0c532 100644
--- a/init.lua
+++ b/init.lua
@@ -7,7 +7,7 @@
farming = {}
farming.mod = "redo"
-farming.version = "1.33"
+farming.version = "20180506"
farming.path = minetest.get_modpath("farming")
farming.select = {
type = "fixed",
@@ -22,16 +22,16 @@ function farming.is_creative(name)
end
-local statistics = dofile(farming.path.."/statistics.lua")
+local statistics = dofile(farming.path .. "/statistics.lua")
-- Intllib
-local S = dofile(farming.path.."/intllib.lua")
+local S = dofile(farming.path .. "/intllib.lua")
farming.intllib = S
-- Utility Function
local time_speed = tonumber(minetest.settings:get("time_speed")) or 72
-local SECS_PER_CYCLE = (time_speed > 0 and 24 * 60 * 60 / time_speed) or 0
+local SECS_PER_CYCLE = (time_speed > 0 and (24 * 60 * 60) / time_speed) or 0
local function clamp(x, min, max)
return (x < min and min) or (x > max and max) or x
end