stained glass now cutable, grval-slopes repaired

This commit is contained in:
Och Noe 2019-01-19 13:11:13 +01:00
parent e3d8aa124d
commit 71e592ed40
5 changed files with 178 additions and 9 deletions

View File

@ -691,7 +691,7 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:gravel_slope2_a 12", output = "moreblocks:gravel_slope_2a 12",
recipe = { recipe = {
{ "","","" }, { "","","" },
{ "","","", }, { "","","", },
@ -700,7 +700,7 @@ minetest.register_craft({
}) })
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:gravel_slope2_b 4", output = "moreblocks:gravel_slope_2b 4",
recipe = { recipe = {
{ "","","default:gravel", }, { "","","default:gravel", },
{ "","","" }, { "","","" },
@ -709,7 +709,7 @@ minetest.register_craft({
}) })
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:gravel_slope3_a 18", output = "moreblocks:gravel_slope_3a 18",
recipe = { recipe = {
{ "","","" }, { "","","" },
{ "","","", }, { "","","", },
@ -718,7 +718,7 @@ minetest.register_craft({
}) })
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:gravel_slope3_b 8", output = "moreblocks:gravel_slope_3b 8",
recipe = { recipe = {
{ "","","" }, { "","","" },
{ "","","default:gravel", }, { "","","default:gravel", },
@ -727,7 +727,7 @@ minetest.register_craft({
}) })
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:gravel_slope3_c 8", output = "moreblocks:gravel_slope_3c 8",
recipe = { recipe = {
{ "","","default:gravel", }, { "","","default:gravel", },
{ "","default:gravel","" }, { "","default:gravel","" },
@ -736,3 +736,4 @@ minetest.register_craft({
}) })

160
nodes.lua
View File

@ -2,6 +2,7 @@
More Blocks: node definitions More Blocks: node definitions
Copyright (c) 2011-2017 Hugo Locurcio and contributors. Copyright (c) 2011-2017 Hugo Locurcio and contributors.
2018,2019 Och_Noe
Licensed under the zlib license. See LICENSE.md for more information. Licensed under the zlib license. See LICENSE.md for more information.
--]] --]]
@ -33,6 +34,57 @@ local box_slope = {
} }
} }
local box_slope_half = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
{-0.5, -0.375, -0.25, 0.5, -0.25, 0.5},
{-0.5, -0.25, 0, 0.5, -0.125, 0.5},
{-0.5, -0.125, 0.25, 0.5, 0, 0.5},
}
}
local box_slope_half_raised = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
{-0.5, 0.125, -0.25, 0.5, 0.25, 0.5},
{-0.5, 0.25, 0, 0.5, 0.375, 0.5},
{-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
}
}
local box_slope_third = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.417 , 0.5},
{-0.5, -0.417, -0.25, 0.5, -0.333 , 0.5},
{-0.5, -0.333, 0, 0.5, -0.250 , 0.5},
{-0.5, -0.250, 0.25, 0.5, -0.167, 0.5},
}
}
local box_slope_third_raised = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.083 , 0.5},
{-0.5, -0.083, -0.25, 0.5, 0 , 0.5},
{-0.5, 0 , 0, 0.5, 0.083 , 0.5},
{-0.5, 0.083, 0.25, 0.5, 0.167, 0.5},
}
}
local box_slope_third_top = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.250, 0.5},
{-0.5, 0.250, -0.25, 0.5, 0.333, 0.5},
{-0.5, 0.333, 0, 0.5, 0.417, 0.5},
{-0.5, 0.417, 0.25, 0.5, 0.5 , 0.5},
}
}
local nodes = { local nodes = {
["wood_tile"] = { ["wood_tile"] = {
@ -432,7 +484,7 @@ local nodes = {
one_texture = true, one_texture = true,
use_texture_alpha = true, use_texture_alpha = true,
paramtype = "light", paramtype = "light",
no_stairs = true; -- no_stairs = true;
sunlight_propagates = true, sunlight_propagates = true,
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass, sounds = sound_glass,
@ -537,18 +589,119 @@ local nodes = {
description = S("Gravel Slope"), description = S("Gravel Slope"),
tiles = { "default_gravel.png" } , tiles = { "default_gravel.png" } ,
no_stairs = true, no_stairs = true,
groups = {crumbly = 2, falling_node = 1}, groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_gravel, sounds = sound_gravel,
drawtype = "mesh", drawtype = "mesh",
mesh = "moreblocks_slope.obj", mesh = "moreblocks_slope.obj",
collision_box = box_slope, collision_box = box_slope,
selection_box = box_slope, selection_box = box_slope,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu is_ground_content = false, --neu
buildable_to = true; -- buildable_to = true;
}, },
["gravel_slope_2a"] = {
description = S("Gravel Slope 2a"),
tiles = { "default_gravel.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_gravel,
drawtype = "mesh",
mesh = "moreblocks_slope_half.obj",
collision_box = box_slope_half,
selection_box = box_slope_half,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
-- buildable_to = true;
},
["gravel_slope_2b"] = {
description = S("Gravel Slope 2b"),
tiles = { "default_gravel.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_gravel,
drawtype = "mesh",
mesh = "moreblocks_slope_half_raised.obj",
collision_box = box_slope_half_raised,
selection_box = box_slope_half_raised,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
-- buildable_to = true;
},
["gravel_slope_3a"] = {
description = S("Gravel Slope 3a"),
tiles = { "default_gravel.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_gravel,
drawtype = "mesh",
mesh = "moreblocks_slope_third.obj",
collision_box = box_slope_third,
selection_box = box_slope_third,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
-- buildable_to = true;
},
["gravel_slope_3b"] = {
description = S("Gravel Slope 3b"),
tiles = { "default_gravel.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_gravel,
drawtype = "mesh",
mesh = "moreblocks_slope_third_raised.obj",
collision_box = box_slope_third_raised,
selection_box = box_slope_third_raised,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
-- buildable_to = true;
},
["gravel_slope_3c"] = {
description = S("Gravel Slope 3c"),
tiles = { "default_gravel.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_gravel,
drawtype = "mesh",
mesh = "moreblocks_slope_third_top.obj",
collision_box = box_slope_third_top,
selection_box = box_slope_third_top,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
-- buildable_to = true;
},
} }
if minetest.get_modpath("ethereal") then if minetest.get_modpath("ethereal") then
@ -580,6 +733,7 @@ for name, def in pairs(nodes) do
sunlight_propagates = def.sunlight_propagates, sunlight_propagates = def.sunlight_propagates,
light_source = def.light_source, light_source = def.light_source,
sounds = def.sounds, sounds = def.sounds,
use_texture_alpha = def.use_texture_alpha
}) })
end end
end end

View File

@ -91,3 +91,8 @@ dofile(modpath .. "/slopes.lua")
dofile(modpath .. "/panels.lua") dofile(modpath .. "/panels.lua")
dofile(modpath .. "/microblocks.lua") dofile(modpath .. "/microblocks.lua")
dofile(modpath .. "/registrations.lua") dofile(modpath .. "/registrations.lua")

View File

@ -85,7 +85,9 @@ for _, name in pairs(default_nodes) do
sounds = ndef.sounds, sounds = ndef.sounds,
tiles = tiles, tiles = tiles,
sunlight_propagates = true, sunlight_propagates = true,
light_source = ndef.light_source light_source = ndef.light_source,
use_texture_alpha = ndef.use_texture_alpha
}) })
end end
end end
@ -126,3 +128,8 @@ if minetest.get_modpath("wool") then
}) })
end end
end end

View File

@ -120,6 +120,7 @@ function register_slope(modname, subname, recipeitem, groups, images, descriptio
drop = drop, drop = drop,
light_source = light, light_source = light,
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
use_texture_alpha = use_texture_alpha
}) })
end end
@ -249,6 +250,7 @@ function stairsplus:register_slope(modname, subname, recipeitem, fields)
def.paramtype2 = def.paramtype2 or "facedir" def.paramtype2 = def.paramtype2 or "facedir"
def.on_place = minetest.rotate_node def.on_place = minetest.rotate_node
def.description = desc def.description = desc
def.use_texture_alpha = fields.use_texture_alpha
def.groups = stairsplus:prepare_groups(fields.groups) def.groups = stairsplus:prepare_groups(fields.groups)
if fields.drop and not (type(fields.drop) == "table") then if fields.drop and not (type(fields.drop) == "table") then
def.drop = modname.. ":slope_" ..fields.drop..alternate def.drop = modname.. ":slope_" ..fields.drop..alternate