Skip to content
Snippets Groups Projects
Commit 89c45993 authored by SmallJoker's avatar SmallJoker Committed by Auke Kok
Browse files

Carts: Fix the rail table overwrite behaviour

parent 0819d4ba
No related branches found
No related tags found
No related merge requests found
......@@ -181,8 +181,8 @@ function carts:pathfinder(pos_, old_pos, old_dir, ctrl, pf_switch, railtype)
return false
end
function carts:register_rail(name, def, railparams)
local def_default = {
function carts:register_rail(name, def_overwrite, railparams)
local def = {
drawtype = "raillike",
paramtype = "light",
sunlight_propagates = true,
......@@ -194,7 +194,7 @@ function carts:register_rail(name, def, railparams)
},
sounds = default.node_sound_metal_defaults()
}
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment