summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorh-v-smacker <hans-von-smacker+github@gmail.com>2018-11-15 06:51:15 +0300
committerh-v-smacker <hans-von-smacker+github@gmail.com>2018-11-15 06:51:15 +0300
commitb0f073a6a792a03d09c6d75deac28c559af2796c (patch)
tree85b422f52a38a1aaa2b98395db6a33cbbe6ff43a
parent7560c272e7df2e0691e301a09c8e01335f622940 (diff)
flint block
-rw-r--r--README.md1
-rw-r--r--flint_block.lua96
-rw-r--r--init.lua2
-rw-r--r--sandstone_cobble.lua6
-rw-r--r--textures/minetest_errata_flint_block.pngbin0 -> 530 bytes
-rw-r--r--textures/minetest_errata_flint_block_slab.pngbin0 -> 555 bytes
-rw-r--r--textures/minetest_errata_flint_block_stair1.pngbin0 -> 544 bytes
-rw-r--r--textures/minetest_errata_flint_block_stair2.pngbin0 -> 527 bytes
8 files changed, 102 insertions, 3 deletions
diff --git a/README.md b/README.md
index 116dead..0dc6192 100644
--- a/README.md
+++ b/README.md
@@ -28,3 +28,4 @@ This mod can borrow some items from other mods (in cases where the whole mod see
* paper walls and wooden bars
* steel bar and wooden bar doors
* sandstone cobble varieties
+ * flint block
diff --git a/flint_block.lua b/flint_block.lua
new file mode 100644
index 0000000..d6bf7e4
--- /dev/null
+++ b/flint_block.lua
@@ -0,0 +1,96 @@
+-- Flint block
+-- a good use for otherwise useless item
+
+local node = {
+ name = "flint_block",
+ desc = "Flint Block",
+ tile = {"minetest_errata_flint_block.png"}
+}
+
+minetest.register_node("minetest_errata:" .. node.name, {
+ description = node.desc,
+ tiles = node.tile,
+ is_ground_content = false,
+ groups = { cracky = 2 },
+ sounds = default.node_sound_stone_defaults(),
+})
+
+minetest.register_craft({
+ output = "minetest_errata:" .. node.name,
+ recipe = {
+ { "default:flint", "default:flint", "default:flint" },
+ { "default:flint", "default:flint", "default:flint" },
+ { "default:flint", "default:flint", "default:flint" },
+ }
+})
+
+minetest.register_craft({
+ output = "default:flint 9 ",
+ recipe = {
+ { "minetest_errata:" .. node.name },
+ }
+})
+
+-- Derivative blocks
+
+
+if stairs and stairs.mod and stairs.mod == "redo" then
+
+ stairs.register_all(node.name, "minetest_errata:" .. node.name,
+ {cracky = 3},
+ node.tile,
+ node.desc .. " Stair",
+ node.desc .. " Slab",
+ default.node_sound_stone_defaults())
+
+elseif minetest.global_exists("stairsplus") then
+
+ stairsplus:register_all("minetest_errata", node.name, "minetest_errata:" .. node.name, {
+ description = node.desc,
+ tiles = node.tile,
+ groups = {cracky = 3},
+ sounds = default.node_sound_stone_defaults(),
+ })
+
+else
+
+-- stairs.register_stair_and_slab(node.name, "minetest_errata:" .. node.name,
+-- {cracky = 3},
+-- node.tile,
+-- node.desc .. " Stair",
+-- node.desc .. " Slab",
+-- default.node_sound_stone_defaults()
+-- )
+
+ stairs.register_slab(node.name, "minetest_errata:" .. node.name,
+ { cracky = 2 },
+ {"minetest_errata_flint_block.png",
+ "minetest_errata_flint_block.png",
+ "minetest_errata_flint_block_slab.png",
+ "minetest_errata_flint_block_slab.png",
+ "minetest_errata_flint_block_slab.png",
+ "minetest_errata_flint_block_slab.png"
+ },
+ node.desc .. " Stair",
+ default.node_sound_stone_defaults()
+ )
+ stairs.register_stair(node.name, "minetest_errata:" .. node.name,
+ { cracky = 2 },
+ {"minetest_errata_flint_block_slab.png",
+ "minetest_errata_flint_block.png",
+ "minetest_errata_flint_block_stair1.png",
+ "minetest_errata_flint_block_stair2.png",
+ "minetest_errata_flint_block.png",
+ "minetest_errata_flint_block_slab.png"
+ },
+ node.desc .. " Slab",
+ default.node_sound_stone_defaults()
+ )
+
+end
+
+
+-- procedurally-generated arcs
+if minetest.get_modpath("pkarcs") then
+ pkarcs.register_node("minetest_errata:" .. node.name)
+end \ No newline at end of file
diff --git a/init.lua b/init.lua
index 1248338..2a38a3f 100644
--- a/init.lua
+++ b/init.lua
@@ -9,6 +9,8 @@ dofile(modpath.."/doors.lua")
dofile(modpath.."/sandstone_cobble.lua")
+dofile(modpath.."/flint_block.lua")
+
dofile(modpath.."/missing_groups.lua")
dofile(modpath.."/xpanes.lua")
diff --git a/sandstone_cobble.lua b/sandstone_cobble.lua
index 0640772..0914b40 100644
--- a/sandstone_cobble.lua
+++ b/sandstone_cobble.lua
@@ -34,7 +34,7 @@ for _,node in ipairs(cobble_table) do
{"minetest_errata_" .. node.name .. "_cobble.png"},
node.desc .. " Cobble Stair",
node.desc .. " Cobble Slab",
- default.node_sound_wood_defaults())
+ default.node_sound_stone_defaults())
elseif minetest.global_exists("stairsplus") then
@@ -42,7 +42,7 @@ for _,node in ipairs(cobble_table) do
description = node.desc .. " Cobble",
tiles = {"minetest_errata_" .. node.name .. "_cobble.png"},
groups = {cracky = 3},
- sounds = default.node_sound_wood_defaults(),
+ sounds = default.node_sound_stone_defaults(),
})
else
@@ -52,7 +52,7 @@ for _,node in ipairs(cobble_table) do
{"minetest_errata_" .. node.name .. "_cobble.png"},
node.desc .. " Cobble Stair",
node.desc .. " Cobble Slab",
- default.node_sound_wood_defaults())
+ default.node_sound_stone_defaults())
end
diff --git a/textures/minetest_errata_flint_block.png b/textures/minetest_errata_flint_block.png
new file mode 100644
index 0000000..4f9cd22
--- /dev/null
+++ b/textures/minetest_errata_flint_block.png
Binary files differ
diff --git a/textures/minetest_errata_flint_block_slab.png b/textures/minetest_errata_flint_block_slab.png
new file mode 100644
index 0000000..bb01368
--- /dev/null
+++ b/textures/minetest_errata_flint_block_slab.png
Binary files differ
diff --git a/textures/minetest_errata_flint_block_stair1.png b/textures/minetest_errata_flint_block_stair1.png
new file mode 100644
index 0000000..0079f65
--- /dev/null
+++ b/textures/minetest_errata_flint_block_stair1.png
Binary files differ
diff --git a/textures/minetest_errata_flint_block_stair2.png b/textures/minetest_errata_flint_block_stair2.png
new file mode 100644
index 0000000..941f5b2
--- /dev/null
+++ b/textures/minetest_errata_flint_block_stair2.png
Binary files differ