From cba969903a76aaa80f48dc05511c27f721deb547 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sun, 12 Feb 2017 11:35:54 +0100 Subject: [PATCH] register_rail: Fix the table overwrite behaviour --- functions.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions.lua b/functions.lua index fcdd1ad..9876eb2 100644 --- a/functions.lua +++ b/functions.lua @@ -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