From 6e52f967038bc1676723619141f6f936ca11165a Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Thu, 17 May 2018 09:25:16 +0100 Subject: add api.txt and tidy code --- init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'init.lua') 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 -- cgit v1.2.3