Initial commit
This commit is contained in:
commit
cfdf0be6fa
6 changed files with 123 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
.idea/
|
||||
*.iml
|
30
README.md
Normal file
30
README.md
Normal file
|
@ -0,0 +1,30 @@
|
|||
Brick Walls
|
||||
===
|
||||
|
||||
This simple mod adds brick walls for the walls mod. There are walls for many types of bricks from different mods.
|
||||
|
||||
Walls are added for the following brick types:
|
||||
- From default (mtg):
|
||||
- Brick
|
||||
- Stone Brick
|
||||
- Desert Stone Brick
|
||||
- Sandstone Brick
|
||||
- Desert Sandstone Brick
|
||||
- Silver Sandstone Brick
|
||||
- Obsidian Brick
|
||||
- From nether:
|
||||
- Nether Brick
|
||||
- Compressed Nether Brick
|
||||
- Cracked Nether Brick
|
||||
- Deep Nether Brick
|
||||
- From ethereal:
|
||||
- Ice Brick
|
||||
- Snow Brick
|
||||
|
||||
The number of blocks that walls connect to will also be expanded.
|
||||
For the walls to be added, it's required to enable the mods containing the corresponding materials (bricks).
|
||||
|
||||
License
|
||||
----
|
||||
|
||||
Code for this mod is released under MIT (https://opensource.org/licenses/MIT).
|
62
init.lua
Normal file
62
init.lua
Normal file
|
@ -0,0 +1,62 @@
|
|||
-- support for translation (there's currently no translation...)
|
||||
local S = minetest.get_translator("brickwalls")
|
||||
|
||||
-- table with {wall_name, wall_desc, wall_mat} for all brick walls added;
|
||||
-- wall_texture_table and wall_sounds will be determined via wall_mat
|
||||
brickwalls = {
|
||||
-- default
|
||||
{"brickwalls:brick", "Brick Wall", "default:brick"},
|
||||
{"brickwalls:stonebrick", "Stone Brick Wall", "default:stonebrick"},
|
||||
{"brickwalls:desert_stonebrick", "Desert Stone Brick Wall", "default:desert_stonebrick"},
|
||||
{"brickwalls:sandstonebrick", "Sandstone Brick Wall", "default:sandstonebrick"},
|
||||
{"brickwalls:desert_sandstone_brick", "Desert Sandstone Brick Wall", "default:desert_sandstone_brick"},
|
||||
{"brickwalls:silver_sandstone_brick", "Silver Sandstone Brick Wall", "default:silver_sandstone_brick"},
|
||||
{"brickwalls:obsidianbrick", "Obsidian Brick Wall", "default:obsidianbrick"},
|
||||
-- nether
|
||||
{"brickwalls:netherbrick", "Nether Brick Wall", "nether:brick"},
|
||||
{"brickwalls:netherbrick_compressed", "Compressed Nether Brick Wall", "nether:brick_compressed"},
|
||||
{"brickwalls:netherbrick_cracked", "Cracked Nether Brick Wall", "nether:brick_cracked"},
|
||||
{"brickwalls:netherbrick_deep", "Deep Nether Brick Wall", "nether:brick_deep"},
|
||||
-- ethereal
|
||||
{"brickwalls:icebrick", "Ice Brick Wall", "ethereal:icebrick"},
|
||||
{"brickwalls:snowbrick", "Snow Brick Wall", "ethereal:snowbrick"},
|
||||
}
|
||||
|
||||
for _, i in pairs(brickwalls) do
|
||||
if minetest.registered_nodes[i[3]] then
|
||||
|
||||
-- register walls
|
||||
walls.register(i[1], S(i[2]), minetest.registered_nodes[i[3]].tiles,
|
||||
i[3], minetest.registered_nodes[i[3]].sounds)
|
||||
|
||||
-- change groups
|
||||
local groups = minetest.registered_nodes[i[3]].groups
|
||||
groups.wall = 1
|
||||
minetest.override_item(i[1], {groups = groups})
|
||||
end
|
||||
end
|
||||
|
||||
-- add more nodes that walls should connect to
|
||||
for n, def in pairs(minetest.registered_nodes) do
|
||||
if def.groups.wall == 1 then
|
||||
minetest.override_item(n, {
|
||||
connects_to = {
|
||||
-- standard groups walls connect to
|
||||
"group:wall", "group:stone", "group:fence",
|
||||
-- default
|
||||
"default:sandstone", "default:sandstonebrick", "default:sandstone_block",
|
||||
"default:desert_sandstone", "default:desert_sandstone_brick", "default:desert_sandstone_block",
|
||||
"default:silver_sandstone", "default:silver_sandstone_brick", "default:silver_sandstone_block",
|
||||
"default:obsidian", "default:obsidianbrick", "default:obsidian_block",
|
||||
"default:ice",
|
||||
"default:brick",
|
||||
-- nether
|
||||
"nether:rack", "nether:rack_deep",
|
||||
"nether:brick", "nether:brick_compressed", "nether:brick_cracked", "nether:brick_deep",
|
||||
--"nether:fence_nether_brick",
|
||||
-- ethereal
|
||||
"ethereal:icebrick", "ethereal:snowbrick"
|
||||
}
|
||||
})
|
||||
end
|
||||
end
|
23
license.txt
Normal file
23
license.txt
Normal file
|
@ -0,0 +1,23 @@
|
|||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2023 philipmi
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
6
mod.conf
Normal file
6
mod.conf
Normal file
|
@ -0,0 +1,6 @@
|
|||
name = brickwalls
|
||||
author = philipmi
|
||||
depends = walls
|
||||
optional_depends = default, nether, ethereal
|
||||
description = Adds brick walls from different types of bricks.
|
||||
title = Brick Walls
|
BIN
screenshot.png
Normal file
BIN
screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 154 KiB |
Loading…
Reference in a new issue