register_rail: Fix the table overwrite behaviour

This commit is contained in:
SmallJoker 2017-02-12 11:35:54 +01:00
parent 71af46f027
commit cba969903a
1 changed files with 3 additions and 3 deletions

View File

@ -192,8 +192,8 @@ function boost_cart:boost_rail(pos, amount)
end
end
function boost_cart:register_rail(name, def)
local def_default = {
function boost_cart:register_rail(name, def_overwrite)
local def = {
drawtype = "raillike",
paramtype = "light",
sunlight_propagates = true,
@ -204,7 +204,7 @@ function boost_cart:register_rail(name, def)
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
}
}
for k, v in pairs(def_default) do
for k, v in pairs(def_overwrite) do
def[k] = v
end
if not def.inventory_image then