VoxeLibre2 migration

This commit is contained in:
JoseDouglas26 2024-06-07 06:47:58 -03:00
parent 6178525db0
commit 76234d8e6b
8 changed files with 54 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -0,0 +1 @@
name = voxelibre

View File

@ -0,0 +1,4 @@
building = {}
building.translator = minetest.get_translator(minetest.get_current_modname())
dofile(minetest.get_modpath(minetest.get_current_modname()).."/structural.lua")

View File

@ -0,0 +1,2 @@
name = building
depends = mcl_sounds, voxelibre

View File

@ -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

1
mods/blocks/modpack.conf Normal file
View File

@ -0,0 +1 @@
name = blocks

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB