summaryrefslogtreecommitdiff
path: root/sandstone_cobble.lua
diff options
context:
space:
mode:
authorh-v-smacker <hans-von-smacker+github@gmail.com>2018-09-23 04:38:15 +0300
committerh-v-smacker <hans-von-smacker+github@gmail.com>2018-09-23 04:38:15 +0300
commit5a8922a0155b003ac0bb8d911e99808ffde1a7da (patch)
treec5beab878c2dbd5dbbe237775d94aefb97fa42f5 /sandstone_cobble.lua
parentc5cc8ec993bee4473af8c2e03c0f92ec0dc9453d (diff)
first actual content
Diffstat (limited to 'sandstone_cobble.lua')
-rw-r--r--sandstone_cobble.lua73
1 files changed, 73 insertions, 0 deletions
diff --git a/sandstone_cobble.lua b/sandstone_cobble.lua
new file mode 100644
index 0000000..0676046
--- /dev/null
+++ b/sandstone_cobble.lua
@@ -0,0 +1,73 @@
+local cobble_table = {
+ {name = "sandstone", desc = "Sandstone"},
+ {name = "desert_sandstone", desc = "Desert Sandstone"},
+ {name = "silver_sandstone", desc = "Silver Sandstone"},
+}
+
+for _,node in ipairs(cobble_table) do
+
+ minetest.register_node("minetest_errata:" .. node.name .. "_cobble", {
+ description = node.desc,
+ tiles = {"minetest_errata_" .. node.name .. "_cobble.png"},
+ groups = {cracky = 3},
+ is_ground_content = false,
+ sounds = default.node_sound_stone_defaults(),
+ })
+
+ minetest.register_craft({
+ output = "minetest_errata:" .. node.name .. "_cobble 2",
+ recipe = { { "default:" .. node.name, "default:" .. node.name } },
+ })
+
+ minetest.register_craft({
+ type = "cooking",
+ output = "default:" .. node.name,
+ recipe = "minetest_errata:" .. node.name .. "_cobble",
+ })
+
+ -- Derivative blocks
+
+ if stairs and stairs.mod and stairs.mod == "redo" then
+
+ stairs.register_all(node.name .. "_cobble", "minetest_errata:" .. node.name .. "_cobble",
+ {cracky = 3},
+ {"minetest_errata_" .. node.name .. "_cobble.png"},
+ node.desc .. " Stair",
+ node.desc .. " Slab",
+ default.node_sound_wood_defaults())
+
+ elseif minetest.global_exists("stairsplus") then
+
+ stairsplus:register_all("minetest_errata", node.name .. "_cobble", "minetest_errata:" .. node.name .. "_cobble", {
+ description = node.desc,
+ tiles = {"minetest_errata_" .. node.name .. "_cobble.png"},
+ groups = {cracky = 3},
+ sounds = default.node_sound_wood_defaults(),
+ })
+
+ else
+
+ stairs.register_stair_and_slab(node.name .. "_cobble", "minetest_errata:" .. node.name .. "_cobble",
+ {cracky = 3},
+ {"minetest_errata_" .. node.name .. "_cobble.png"},
+ node.desc .. " Stair",
+ node.desc .. " Slab",
+ default.node_sound_wood_defaults())
+
+ end
+
+
+ -- Walls
+ walls.register("minetest_errata:wall_" .. node.name .. "_cobble",
+ node.desc .. " Cobble Wall",
+ "minetest_errata_" .. node.name .. "_cobble.png",
+ "minetest_errata:" .. node.name .. "_cobble",
+ default.node_sound_stone_defaults()
+ )
+
+ -- procedurally-generated arcs
+ if minetest.get_modpath("pkarcs") then
+ pkarcs.register_node("minetest_errata:" .. node.name .. "_cobble")
+ end
+
+end