mirror of
https://github.com/SmallJoker/boost_cart.git
synced 2024-12-25 02:10:19 +01:00
register_rail: Fix the table overwrite behaviour
This commit is contained in:
parent
71af46f027
commit
cba969903a
@ -192,8 +192,8 @@ function boost_cart:boost_rail(pos, amount)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function boost_cart:register_rail(name, def)
|
function boost_cart:register_rail(name, def_overwrite)
|
||||||
local def_default = {
|
local def = {
|
||||||
drawtype = "raillike",
|
drawtype = "raillike",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
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},
|
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
|
def[k] = v
|
||||||
end
|
end
|
||||||
if not def.inventory_image then
|
if not def.inventory_image then
|
||||||
|
Loading…
Reference in New Issue
Block a user