Use minetest.raillike_group, do not connect rails with other raillike

This commit is contained in:
SmallJoker
2017-07-01 10:45:15 +02:00
parent b80d3aed4c
commit af25c5411b
2 changed files with 12 additions and 3 deletions

View File

@ -217,7 +217,15 @@ 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}
local groups = {
dig_immediate = 2,
attached_node = 1,
rail = 1,
connect_to_raillike = 1
}
if minetest.raillike_group then
groups.connect_to_raillike = minetest.raillike_group("rail")
end
if type(additional_groups) == "table" then
for k, v in pairs(additional_groups) do
groups[k] = v