forked from VoxeLibre/VoxeLibre
VoxeLibre2 migration
This commit is contained in:
parent
6178525db0
commit
76234d8e6b
|
@ -46,4 +46,4 @@ enable_client_modding = true
|
|||
csm_restriction_flags = 0
|
||||
enable_mod_channels = true
|
||||
|
||||
texture_path = C:\minetest\textures\64x64
|
||||
# texture_path = C:\minetest\textures\64x64
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
voxelibre = {}
|
||||
|
||||
function table.merge(tbl, ...)
|
||||
local new_tbl = table.copy(tbl)
|
||||
|
||||
for _, tbl2 in ipairs({...}) do
|
||||
for key, value in pairs(tbl2) do
|
||||
if type(value) == "table" and type(new_tbl[key]) == "table" then
|
||||
new_tbl[key] = table.merge(new_tbl[key], value)
|
||||
else
|
||||
new_tbl[key] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return new_tbl
|
||||
end
|
||||
|
||||
_G.table = _G.table or {}
|
||||
_G.table.merge = table.merge
|
|
@ -0,0 +1 @@
|
|||
name = voxelibre
|
|
@ -0,0 +1,4 @@
|
|||
building = {}
|
||||
building.translator = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
dofile(minetest.get_modpath(minetest.get_current_modname()).."/structural.lua")
|
|
@ -0,0 +1,2 @@
|
|||
name = building
|
||||
depends = mcl_sounds, voxelibre
|
|
@ -0,0 +1,25 @@
|
|||
building.structural_blocks = {}
|
||||
local S = building.translator
|
||||
|
||||
local commondefs = {
|
||||
planks = {
|
||||
_blast_resistance = 3,
|
||||
_hardness = 2,
|
||||
groups = {axey = 1, building_blocks = 1, handy = 1, planks = 1},
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
stack_max = 64
|
||||
}
|
||||
}
|
||||
|
||||
local planks = {
|
||||
["acacia"] = {
|
||||
description = S("Acacia Planks"),
|
||||
groups = {fire_encouragement = 20, fire_flammability = 5, flammable = 3},
|
||||
tiles = {"building_acacia_planks.png"}
|
||||
}
|
||||
}
|
||||
|
||||
for identifier, definitions in pairs(planks) do
|
||||
identifier = ":blocks:"..identifier.."_planks"
|
||||
minetest.register_node(identifier, table.merge(commondefs.planks, definitions))
|
||||
end
|
|
@ -0,0 +1 @@
|
|||
name = blocks
|
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
Loading…
Reference in New Issue