From 6281dc744dc3951234931a9f44c3bdd353f79df7 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Fri, 27 Oct 2017 15:13:31 -0400 Subject: updated boost cart, homedecor modpack, castles modpack, currency, farming-redo, maptools, mesecons, moreblocks, moreores, pipeworks, quartz --- boost_cart/init.lua | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'boost_cart/init.lua') diff --git a/boost_cart/init.lua b/boost_cart/init.lua index 9bcd785..1b2afa2 100644 --- a/boost_cart/init.lua +++ b/boost_cart/init.lua @@ -3,18 +3,22 @@ boost_cart = {} boost_cart.modpath = minetest.get_modpath("boost_cart") --- Settings glue for <= 0.4.15 -local setting_getter = minetest.setting_get -if minetest.settings then - setting_getter = function (key) - return minetest.settings:get(key) - end +if not minetest.settings then + error("[boost_cart] Your Minetest version is no longer supported." + .. " (Version <= 0.4.15)") +end + +local function getNum(setting) + return tonumber(minetest.settings:get(setting)) end -- Maximal speed of the cart in m/s -boost_cart.speed_max = tonumber(setting_getter("boost_cart.speed_max")) or 10 +boost_cart.speed_max = getNum("boost_cart.speed_max") or 10 -- Set to -1 to disable punching the cart from inside -boost_cart.punch_speed_max = tonumber(setting_getter("boost_cart.punch_speed_max")) or 7 +boost_cart.punch_speed_max = getNum("boost_cart.punch_speed_max") or 7 +-- Maximal distance for the path correction (for dtime peaks) +boost_cart.path_distance_max = 3 + -- Support for non-default games if not default.player_attached then -- cgit v1.2.3