Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic stone walls, using NDT_CONNECTED.
These basic connected wall nodes automatically connect to neigboring stone blocks, other wall blocks and anything that's "cracky". The do not connect to wood (fences will do that). The walls are generated using a new walls.register() API. Documentation on the API is included in game_api.txt. This change requires minetest/minetest#3503. Walls are added for all cobble stone materials. They generally look best and are the natural use cases for these materials.
- Loading branch information
Showing
3 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
|
||
--[[ | ||
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:cracky", "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()) | ||