aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOch Noe <och_noe@forksworld.de>2018-12-20 06:46:57 +0100
committerOch Noe <och_noe@forksworld.de>2018-12-20 06:46:57 +0100
commitf2875ce3d010558e270c0e78ef25ccda01479a43 (patch)
treed59c7944171315e524fb1291b6e09e8668318307
parent3abadd74789388a31b9c59bbcacfe6ae933e6c49 (diff)
downloadmoreblocks-f2875ce3d010558e270c0e78ef25ccda01479a43.tar.gz
moreblocks-f2875ce3d010558e270c0e78ef25ccda01479a43.tar.bz2
moreblocks-f2875ce3d010558e270c0e78ef25ccda01479a43.zip
adding slopes for gravel
- simple slope (45°) done - 2-step slopes (2 nodes) : crafting done - 3-step slopes (3 nodes) : crafting done
-rw-r--r--crafting.lua65
-rw-r--r--nodes.lua39
2 files changed, 104 insertions, 0 deletions
diff --git a/crafting.lua b/crafting.lua
index 8b97c37..72c5503 100644
--- a/crafting.lua
+++ b/crafting.lua
@@ -646,6 +646,7 @@ minetest.register_craft({
"default:glass", "default:glass", "default:glass"}
})
+
minetest.register_craft({
type = "shapeless",
output = "moreblocks:red_tinted_glass 8",
@@ -671,3 +672,67 @@ minetest.register_craft({
})
+minetest.register_craft({
+ output = "moreblocks:gravel_stonebrick 2",
+ recipe = {
+ { "default:gravel" },
+ { "default:stonebrick"},
+ }
+ })
+
+minetest.register_craft({
+ output = "moreblocks:gravel_slope 6",
+ recipe = {
+ { "","","" },
+ { "","","default:gravel", },
+ { "", "default:gravel", "default:gravel" },
+ }
+ })
+
+
+minetest.register_craft({
+ output = "moreblocks:gravel_slope2_a 12",
+ recipe = {
+ { "","","" },
+ { "","","", },
+ { "", "default:gravel", "default:gravel" },
+ }
+ })
+
+minetest.register_craft({
+ output = "moreblocks:gravel_slope2_b 4",
+ recipe = {
+ { "","","default:gravel", },
+ { "","","" },
+ { "", "default:gravel", "default:gravel" },
+ }
+ })
+
+minetest.register_craft({
+ output = "moreblocks:gravel_slope3_a 18",
+ recipe = {
+ { "","","" },
+ { "","","", },
+ { "default:gravel", "default:gravel", "default:gravel" },
+ }
+ })
+
+minetest.register_craft({
+ output = "moreblocks:gravel_slope3_b 8",
+ recipe = {
+ { "","","" },
+ { "","","default:gravel", },
+ { "default:gravel", "default:gravel", "default:gravel" },
+ }
+ })
+
+minetest.register_craft({
+ output = "moreblocks:gravel_slope3_c 8",
+ recipe = {
+ { "","","default:gravel", },
+ { "","default:gravel","" },
+ { "default:gravel", "default:gravel", "default:gravel" },
+ }
+ })
+
+
diff --git a/nodes.lua b/nodes.lua
index 913292b..3319dab 100644
--- a/nodes.lua
+++ b/nodes.lua
@@ -12,6 +12,7 @@ local sound_wood = default.node_sound_wood_defaults()
local sound_stone = default.node_sound_stone_defaults()
local sound_glass = default.node_sound_glass_defaults()
local sound_leaves = default.node_sound_leaves_defaults()
+local sound_gravel = default.node_sound_gravel_defaults()
-- Don't break on 0.4.14 and earlier.
local sound_metal = (default.node_sound_metal_defaults
@@ -22,6 +23,17 @@ local function tile_tiles(name)
return {tex, tex, tex, tex, tex.. "^[transformR90", tex.. "^[transformR90"}
end
+local box_slope = {
+ type = "fixed",
+ fixed = {
+ {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
+ {-0.5, -0.25, -0.25, 0.5, 0, 0.5},
+ {-0.5, 0, 0, 0.5, 0.25, 0.5},
+ {-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}
+ }
+}
+
+
local nodes = {
["wood_tile"] = {
description = S("Wooden Tile"),
@@ -509,6 +521,33 @@ local nodes = {
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
},
+ ["gravel_stonebrick"] = {
+ description = S("Gravel on Stonebrick"),
+ tiles = {"default_gravel.png",
+ "default_stone_brick.png",
+ "default_gravel.png^[lowpart:50:default_stone_brick.png",
+ "default_gravel.png^[lowpart:50:default_stone_brick.png",
+ "default_gravel.png^[lowpart:50:default_stone_brick.png",
+ "default_gravel.png^[lowpart:50:default_stone_brick.png"},
+ no_stairs = true;
+ groups = {cracky = 3},
+ sounds = sound_gravel,
+ },
+ ["gravel_slope"] = {
+ description = S("Gravel Slope"),
+ tiles = { "default_gravel.png" } ,
+ no_stairs = true,
+ groups = {crumbly = 2, falling_node = 1},
+ sounds = sound_gravel,
+ drawtype = "mesh",
+ mesh = "moreblocks_slope.obj",
+ collision_box = box_slope,
+ selection_box = box_slope,
+ paramtype2 = "facedir", -- neu
+ on_rotate = screwdriver.rotate_simple , -- neu
+ is_ground_content = false, --neu
+ buildable_to = true;
+ },
}