From 92f49e3096dc37b9b802994d287c47dc7f583c24 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Thu, 11 Aug 2016 18:39:55 -0400 Subject: updated boost_cart, plantlife, castle, homedecor, fake_fire, glooptest, quartz, unified_inventory, inbox, mesecons, and worldedit mods --- boost_cart/functions.lua | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'boost_cart/functions.lua') diff --git a/boost_cart/functions.lua b/boost_cart/functions.lua index bcbbaa0..e94ac07 100644 --- a/boost_cart/functions.lua +++ b/boost_cart/functions.lua @@ -55,7 +55,7 @@ function boost_cart:is_rail(pos, railtype) return minetest.get_item_group(node, "connect_to_raillike") == railtype end -function boost_cart:check_front_up_down(pos, dir_, check_down, railtype) +function boost_cart:check_front_up_down(pos, dir_, check_up, railtype) local dir = vector.new(dir_) local cur = nil @@ -66,7 +66,7 @@ function boost_cart:check_front_up_down(pos, dir_, check_down, railtype) return dir end -- Up - if check_down then + if check_up then dir.y = 1 cur = vector.add(pos, dir) if boost_cart:is_rail(cur, railtype) then @@ -212,4 +212,15 @@ function boost_cart:register_rail(name, def) end minetest.register_node(name, def) -end \ No newline at end of file +end + +function boost_cart:get_rail_groups(additional_groups) + -- Get the default rail groups and add more when a table is given + local groups = {dig_immediate = 2, attached_node = 1, rail = 1, connect_to_raillike = 1} + if type(additional_groups) == "table" then + for k, v in pairs(additional_groups) do + groups[k] = v + end + end + return groups +end -- cgit v1.2.3