Skip to content

Commit

Permalink
Carts: Fix the rail table overwrite behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallJoker authored and sofar committed Feb 12, 2017
1 parent 0819d4b commit 89c4599
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mods/carts/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 89c4599

Please sign in to comment.