forked from VoxeLibre/VoxeLibre
Changes on API code
This commit is contained in:
parent
f4bf86f434
commit
fd208f1477
|
@ -62,6 +62,20 @@ local function set_description(mod_name, identifier, definitions)
|
|||
end
|
||||
end
|
||||
|
||||
local function set_groups(definitions)
|
||||
if definitions.walkable == false then
|
||||
definitions.groups.solidity = 0
|
||||
else
|
||||
definitions.groups.solidity = 1
|
||||
end
|
||||
|
||||
if not definitions.drawtype and not definitions.groups.opacity then
|
||||
definitions.groups.opacity = 1
|
||||
else
|
||||
definitions.groups.opacity = 0
|
||||
end
|
||||
end
|
||||
|
||||
local function set_images(mod_name, identifier, definitions)
|
||||
local base_image_name = mod_name.."_"..identifier..".png"
|
||||
|
||||
|
@ -118,6 +132,7 @@ function voxelibre.register_block(identifier, definitions)
|
|||
end
|
||||
|
||||
set_description(mod_name, identifier, definitions)
|
||||
set_groups(definitions)
|
||||
set_images(mod_name, identifier, definitions)
|
||||
set_tiles(mod_name, identifier, definitions)
|
||||
|
||||
|
|
|
@ -21,17 +21,17 @@ local commondefs = {
|
|||
}
|
||||
|
||||
local planks = {
|
||||
["acacia"] = {groups = commondefs.flammable_planks_groups},
|
||||
["bamboo"] = {groups = commondefs.flammable_planks_groups},
|
||||
["birch"] = {groups = commondefs.flammable_planks_groups},
|
||||
["cherry"] = {groups = commondefs.flammable_planks_groups},
|
||||
["crimson"] = {},
|
||||
["acacia"] = {groups = commondefs.flammable_planks_groups},
|
||||
["bamboo"] = {groups = commondefs.flammable_planks_groups},
|
||||
["birch"] = {groups = commondefs.flammable_planks_groups},
|
||||
["cherry"] = {groups = commondefs.flammable_planks_groups},
|
||||
["crimson"] = {},
|
||||
["dark_oak"] = {groups = commondefs.flammable_planks_groups},
|
||||
["jungle"] = {groups = commondefs.flammable_planks_groups},
|
||||
["jungle"] = {groups = commondefs.flammable_planks_groups},
|
||||
["mangrove"] = {groups = commondefs.flammable_planks_groups},
|
||||
["oak"] = {groups = commondefs.flammable_planks_groups},
|
||||
["spruce"] = {groups = commondefs.flammable_planks_groups},
|
||||
["warped"] = {}
|
||||
["oak"] = {groups = commondefs.flammable_planks_groups},
|
||||
["spruce"] = {groups = commondefs.flammable_planks_groups},
|
||||
["warped"] = {}
|
||||
}
|
||||
|
||||
for _, color in pairs(voxelibre.colors) do
|
||||
|
|
Loading…
Reference in New Issue