add replace
support
This commit is contained in:
parent
1e8a0a7fc9
commit
f2d58d84d4
@ -9,7 +9,7 @@ building_lib.register_placement("default", {
|
|||||||
|
|
||||||
if type(building_def.catalog) == "table" then
|
if type(building_def.catalog) == "table" then
|
||||||
catalog = mapblock_lib.get_catalog(building_def.catalog.filename)
|
catalog = mapblock_lib.get_catalog(building_def.catalog.filename)
|
||||||
offset = building_def.catalog.offset
|
offset = building_def.catalog.offset or {x=0, y=0, z=0}
|
||||||
cache = building_def.catalog.cache
|
cache = building_def.catalog.cache
|
||||||
else
|
else
|
||||||
catalog = mapblock_lib.get_catalog(building_def.catalog)
|
catalog = mapblock_lib.get_catalog(building_def.catalog)
|
||||||
@ -53,7 +53,8 @@ building_lib.register_placement("default", {
|
|||||||
axis = "y",
|
axis = "y",
|
||||||
angle = rotation,
|
angle = rotation,
|
||||||
disable_orientation = building_def.disable_orientation
|
disable_orientation = building_def.disable_orientation
|
||||||
}
|
},
|
||||||
|
replace = building_def.replace
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -74,7 +75,7 @@ building_lib.register_placement("default", {
|
|||||||
get_size = function(_, _, building_def, rotation)
|
get_size = function(_, _, building_def, rotation)
|
||||||
local size
|
local size
|
||||||
if type(building_def.catalog) == "table" then
|
if type(building_def.catalog) == "table" then
|
||||||
size = building_def.catalog.size
|
size = building_def.catalog.size or {x=1, y=1, z=1}
|
||||||
else
|
else
|
||||||
local catalog = mapblock_lib.get_catalog(building_def.catalog)
|
local catalog = mapblock_lib.get_catalog(building_def.catalog)
|
||||||
size = catalog:get_size()
|
size = catalog:get_size()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user