diff --git a/minetest.conf b/minetest.conf index 4905ad1e4..733d4bcd7 100644 --- a/minetest.conf +++ b/minetest.conf @@ -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 diff --git a/mods/CORE/voxelibre/init.lua b/mods/CORE/voxelibre/init.lua new file mode 100644 index 000000000..bc98ce358 --- /dev/null +++ b/mods/CORE/voxelibre/init.lua @@ -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 diff --git a/mods/CORE/voxelibre/mod.conf b/mods/CORE/voxelibre/mod.conf new file mode 100644 index 000000000..5509e51be --- /dev/null +++ b/mods/CORE/voxelibre/mod.conf @@ -0,0 +1 @@ +name = voxelibre diff --git a/mods/blocks/building/init.lua b/mods/blocks/building/init.lua new file mode 100644 index 000000000..cf6e2ed8e --- /dev/null +++ b/mods/blocks/building/init.lua @@ -0,0 +1,4 @@ +building = {} +building.translator = minetest.get_translator(minetest.get_current_modname()) + +dofile(minetest.get_modpath(minetest.get_current_modname()).."/structural.lua") diff --git a/mods/blocks/building/mod.conf b/mods/blocks/building/mod.conf new file mode 100644 index 000000000..da8719def --- /dev/null +++ b/mods/blocks/building/mod.conf @@ -0,0 +1,2 @@ +name = building +depends = mcl_sounds, voxelibre diff --git a/mods/blocks/building/structural.lua b/mods/blocks/building/structural.lua new file mode 100644 index 000000000..b161f6f23 --- /dev/null +++ b/mods/blocks/building/structural.lua @@ -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 diff --git a/mods/blocks/modpack.conf b/mods/blocks/modpack.conf new file mode 100644 index 000000000..54b443856 --- /dev/null +++ b/mods/blocks/modpack.conf @@ -0,0 +1 @@ +name = blocks diff --git a/textures/building/building_acacia_planks.png b/textures/building/building_acacia_planks.png new file mode 100644 index 000000000..1d626a0b6 Binary files /dev/null and b/textures/building/building_acacia_planks.png differ