mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-10 12:30:17 +01:00
de031dddf1
- Everything is updated, except doors - Some textures are moved to other mods (removed from default, but still used by those mods)
62 lines
1.8 KiB
Lua
62 lines
1.8 KiB
Lua
|
|
--[[
|
|
|
|
Walls mod for Minetest
|
|
|
|
Copyright (C) 2015 Auke Kok <sofar@foo-projects.org>
|
|
|
|
This program is free software. It comes without any warranty, to
|
|
the extent permitted by applicable law. You can redistribute it
|
|
and/or modify it under the terms of the Do What The Fuck You Want
|
|
To Public License, Version 2, as published by Sam Hocevar. See
|
|
http://sam.zoy.org/wtfpl/COPYING for more details.
|
|
|
|
--]]
|
|
|
|
walls = {}
|
|
|
|
walls.register = function(wall_name, wall_desc, wall_texture, wall_mat, wall_sounds)
|
|
-- inventory node, and pole-type wall start item
|
|
minetest.register_node(wall_name, {
|
|
description = wall_desc,
|
|
drawtype = "nodebox",
|
|
node_box = {
|
|
type = "connected",
|
|
fixed = {{-1/4, -1/2, -1/4, 1/4, 1/2, 1/4}},
|
|
-- connect_bottom =
|
|
connect_front = {{-3/16, -1/2, -1/2, 3/16, 3/8, -1/4}},
|
|
connect_left = {{-1/2, -1/2, -3/16, -1/4, 3/8, 3/16}},
|
|
connect_back = {{-3/16, -1/2, 1/4, 3/16, 3/8, 1/2}},
|
|
connect_right = {{ 1/4, -1/2, -3/16, 1/2, 3/8, 3/16}},
|
|
},
|
|
connects_to = { "group:wall", "group:stone" },
|
|
paramtype = "light",
|
|
is_ground_content = false,
|
|
tiles = { wall_texture, },
|
|
walkable = true,
|
|
groups = { cracky = 3, wall = 1, stone = 2 },
|
|
sounds = wall_sounds,
|
|
})
|
|
|
|
-- crafting recipe
|
|
minetest.register_craft({
|
|
output = wall_name .. " 6",
|
|
recipe = {
|
|
{ '', '', '' },
|
|
{ wall_mat, wall_mat, wall_mat},
|
|
{ wall_mat, wall_mat, wall_mat},
|
|
}
|
|
})
|
|
|
|
end
|
|
|
|
walls.register("walls:cobble", "Cobblestone Wall", "default_cobble.png",
|
|
"default:cobble", default.node_sound_stone_defaults())
|
|
|
|
walls.register("walls:mossycobble", "Mossy Cobblestone Wall", "default_mossycobble.png",
|
|
"default:mossycobble", default.node_sound_stone_defaults())
|
|
|
|
walls.register("walls:desertcobble", "Desert Cobblestone Wall", "default_desert_cobble.png",
|
|
"default:desert_cobble", default.node_sound_stone_defaults())
|
|
|