if both gloopblocks and moreblocks present, don't register "gravel spread"

alias it to gloopblocks:slab_gravel_1
This commit is contained in:
Vanessa Dannenberg 2018-10-25 13:03:25 -04:00
parent f7ff5ae3f4
commit bf79c7d430
4 changed files with 40 additions and 27 deletions

View File

@ -19,6 +19,10 @@ if minetest.get_modpath("moreblocks") then
minetest.unregister_item("moreblocks:tar") minetest.unregister_item("moreblocks:tar")
minetest.register_alias("moreblocks:tar", "building_blocks:Tar") minetest.register_alias("moreblocks:tar", "building_blocks:Tar")
stairsplus:register_alias_all("moreblocks", "tar", "building_blocks", "Tar") stairsplus:register_alias_all("moreblocks", "tar", "building_blocks", "Tar")
if minetest.get_modpath("gloopblocks") then
minetest.register_alias("building_blocks:gravel_spread", "gloopblocks:slab_gravel_1")
end
end end
minetest.register_alias("adobe", "building_blocks:Adobe") minetest.register_alias("adobe", "building_blocks:Adobe")

View File

@ -1,4 +1,5 @@
default default
homedecor_i18n homedecor_i18n
moreblocks? moreblocks?
gloopblocks?
stairs? stairs?

View File

@ -131,26 +131,30 @@ minetest.register_node("building_blocks:brobble_spread", {
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3}, groups = {crumbly=3},
}) })
minetest.register_node("building_blocks:gravel_spread", {
drawtype = "raillike", if not minetest.get_modpath("moreblocks") or not minetest.get_modpath("gloopblocks") then
description = S("Gravel Spread"), minetest.register_node("building_blocks:gravel_spread", {
tiles = {"default_gravel.png"}, drawtype = "raillike",
inventory_image = "building_blocks_gravel_spread_inv.png", description = S("Gravel Spread"),
paramtype = "light", tiles = {"default_gravel.png"},
walkable = false, inventory_image = "building_blocks_gravel_spread_inv.png",
selection_box = { paramtype = "light",
type = "fixed", walkable = false,
-- but how to specify the dimensions for curved and sideways rails? selection_box = {
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, type = "fixed",
}, -- but how to specify the dimensions for curved and sideways rails?
sunlight_propagates = true, fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
is_ground_content = true, },
groups = {crumbly=2}, sunlight_propagates = true,
sounds = default.node_sound_dirt_defaults({ is_ground_content = true,
footstep = {name="default_gravel_footstep", gain=0.5}, groups = {crumbly=2},
dug = {name="default_gravel_footstep", gain=1.0}, sounds = default.node_sound_dirt_defaults({
}), footstep = {name="default_gravel_footstep", gain=0.5},
}) dug = {name="default_gravel_footstep", gain=1.0},
}),
})
end
minetest.register_node("building_blocks:Tarmac_spread", { minetest.register_node("building_blocks:Tarmac_spread", {
drawtype = "raillike", drawtype = "raillike",
description = S("Tarmac Spread"), description = S("Tarmac Spread"),

View File

@ -60,12 +60,16 @@ minetest.register_craft({
{"default:glass", "default:glass"}, {"default:glass", "default:glass"},
} }
}) })
minetest.register_craft({
output = 'building_blocks:gravel_spread 4', if not minetest.get_modpath("moreblocks") or not minetest.get_modpath("gloopblocks") then
recipe = { minetest.register_craft({
{"default:gravel", "default:gravel", "default:gravel"}, output = 'building_blocks:gravel_spread 4',
} recipe = {
}) {"default:gravel", "default:gravel", "default:gravel"},
}
})
end
minetest.register_craft({ minetest.register_craft({
output = 'building_blocks:hardwood 2', output = 'building_blocks:hardwood 2',
recipe = { recipe = {