From 89c45993acae89ee1bc68f42e510f5304f13ffa9 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sun, 12 Feb 2017 11:47:22 +0100 Subject: [PATCH] Carts: Fix the rail table overwrite behaviour --- mods/carts/functions.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/carts/functions.lua b/mods/carts/functions.lua index 285645cb..a4717194 100644 --- a/mods/carts/functions.lua +++ b/mods/carts/functions.lua @@ -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 -- 2.25.1