2020-08-04 19:16:51 +02:00
|
|
|
local S = minetest.get_translator("building_blocks")
|
2017-09-27 15:44:33 +02:00
|
|
|
|
|
|
|
local function building_blocks_stairs(nodename, def)
|
2018-04-16 20:03:23 +02:00
|
|
|
minetest.register_node(nodename, def)
|
2021-11-28 05:43:59 +01:00
|
|
|
if minetest.get_modpath("moreblocks") then
|
2017-09-27 15:44:33 +02:00
|
|
|
local mod, name = nodename:match("(.*):(.*)")
|
2021-11-28 05:43:59 +01:00
|
|
|
stairsplus:register_all(mod, name, nodename, def)
|
2018-04-16 20:03:23 +02:00
|
|
|
|
2021-11-28 05:43:59 +01:00
|
|
|
minetest.register_alias("stairs:slab_" .. name, mod .. ":slab_" .. name)
|
|
|
|
minetest.register_alias("stairs:stair_" .. name, mod .. ":stair_" .. name)
|
|
|
|
minetest.register_alias("stairs:stair_inner_" .. name, mod .. ":stair_" .. name .. "_inner")
|
|
|
|
minetest.register_alias("stairs:stair_outer_" .. name, mod .. ":stair_" .. name .. "_outer")
|
2017-09-27 15:44:33 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-09-29 17:58:55 +02:00
|
|
|
building_blocks_stairs("building_blocks:grate", {
|
|
|
|
drawtype = "glasslike",
|
|
|
|
description = S("Grate"),
|
|
|
|
tiles = {"building_blocks_grate.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
is_ground_content = true,
|
2021-11-28 05:43:59 +01:00
|
|
|
use_texture_alpha = "clip",
|
2022-05-03 21:21:14 +02:00
|
|
|
groups = {cracky=1, dig_generic=3},
|
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_metal_defaults",
|
|
|
|
},
|
2017-09-29 17:58:55 +02:00
|
|
|
})
|
|
|
|
building_blocks_stairs("building_blocks:smoothglass", {
|
|
|
|
drawtype = "glasslike",
|
|
|
|
description = S("Streak Free Glass"),
|
|
|
|
tiles = {"building_blocks_sglass.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
is_ground_content = true,
|
2021-11-28 05:43:59 +01:00
|
|
|
use_texture_alpha = "clip",
|
2017-09-29 17:58:55 +02:00
|
|
|
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_glass_defaults",
|
|
|
|
},
|
2017-09-29 17:58:55 +02:00
|
|
|
})
|
|
|
|
building_blocks_stairs("building_blocks:woodglass", {
|
|
|
|
drawtype = "glasslike",
|
|
|
|
description = S("Wood Framed Glass"),
|
|
|
|
tiles = {"building_blocks_wglass.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
is_ground_content = true,
|
2021-11-28 05:43:59 +01:00
|
|
|
use_texture_alpha = "clip",
|
2017-09-29 17:58:55 +02:00
|
|
|
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
|
2022-05-03 21:21:14 +02:00
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_glass_defaults",
|
|
|
|
},
|
2017-09-29 17:58:55 +02:00
|
|
|
})
|
|
|
|
|
2017-09-27 15:44:33 +02:00
|
|
|
building_blocks_stairs("building_blocks:Adobe", {
|
|
|
|
tiles = {"building_blocks_Adobe.png"},
|
|
|
|
description = S("Adobe"),
|
|
|
|
is_ground_content = true,
|
2022-05-03 21:21:14 +02:00
|
|
|
groups = {crumbly=3, dig_stone=2},
|
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_stone_defaults",
|
|
|
|
},
|
2017-09-27 15:44:33 +02:00
|
|
|
})
|
2022-05-03 21:21:14 +02:00
|
|
|
local grasstex = {"[combine:16x16^[noalpha^[colorize:#006400"}
|
|
|
|
if minetest.get_modpath("default") then
|
|
|
|
grasstex = minetest.registered_nodes["default:dirt_with_grass"].tiles
|
|
|
|
end
|
2017-09-27 17:05:20 +02:00
|
|
|
building_blocks_stairs("building_blocks:fakegrass", {
|
2022-05-03 21:21:14 +02:00
|
|
|
tiles = grasstex,
|
2017-09-27 17:05:20 +02:00
|
|
|
description = S("Fake Grass"),
|
2017-09-27 15:44:33 +02:00
|
|
|
is_ground_content = true,
|
2022-05-03 21:21:14 +02:00
|
|
|
groups = {crumbly=3, dig_sand=3},
|
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_dirt_defaults",
|
|
|
|
},
|
2017-09-27 15:44:33 +02:00
|
|
|
})
|
2017-09-27 17:05:20 +02:00
|
|
|
building_blocks_stairs("building_blocks:hardwood", {
|
|
|
|
tiles = {"building_blocks_hardwood.png"},
|
2017-09-27 15:44:33 +02:00
|
|
|
is_ground_content = true,
|
2017-09-27 17:05:20 +02:00
|
|
|
description = S("Hardwood"),
|
2022-05-03 21:21:14 +02:00
|
|
|
groups = {choppy=1,flammable=1, dig_tree=1},
|
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_wood_defaults",
|
|
|
|
},
|
2017-09-27 15:44:33 +02:00
|
|
|
})
|
2017-09-27 17:05:20 +02:00
|
|
|
building_blocks_stairs("building_blocks:Roofing", {
|
|
|
|
tiles = {"building_blocks_Roofing.png"},
|
2017-09-27 15:44:33 +02:00
|
|
|
is_ground_content = true,
|
2017-09-27 17:05:20 +02:00
|
|
|
description = S("Roof block"),
|
2022-05-03 21:21:14 +02:00
|
|
|
groups = {snappy=3, dig_generic=4},
|
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_stone_defaults",
|
|
|
|
},
|
2017-09-27 15:44:33 +02:00
|
|
|
})
|
2017-09-27 17:05:20 +02:00
|
|
|
building_blocks_stairs("building_blocks:Tar", {
|
|
|
|
description = S("Tar"),
|
|
|
|
tiles = {"building_blocks_tar.png"},
|
2017-09-27 15:44:33 +02:00
|
|
|
is_ground_content = true,
|
2022-05-03 21:21:14 +02:00
|
|
|
groups = {crumbly=1, tar_block = 1, dig_generic=4},
|
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_stone_defaults",
|
|
|
|
},
|
2017-09-27 15:44:33 +02:00
|
|
|
})
|
2017-09-27 17:05:20 +02:00
|
|
|
building_blocks_stairs("building_blocks:Marble", {
|
|
|
|
description = S("Marble"),
|
|
|
|
tiles = {"building_blocks_marble.png"},
|
|
|
|
is_ground_content = true,
|
2022-05-03 21:21:14 +02:00
|
|
|
groups = {cracky=3, marble = 1, dig_stone=2},
|
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_stone_defaults",
|
|
|
|
},
|
2017-09-27 17:05:20 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("building_blocks:brobble_spread", {
|
2017-09-27 15:44:33 +02:00
|
|
|
drawtype = "raillike",
|
2017-09-27 17:05:20 +02:00
|
|
|
-- Translators: "Brobble" is a portmanteau of "Brick" and "Cobble".
|
|
|
|
-- Translate however you see fit.
|
|
|
|
description = S("Brobble Spread"),
|
|
|
|
tiles = {"building_blocks_brobble.png"},
|
|
|
|
inventory_image = "building_blocks_brobble_spread_inv.png",
|
2017-09-27 15:44:33 +02:00
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
2022-05-03 21:21:14 +02:00
|
|
|
-- but how to specify the dimensions for curved and sideways rails?
|
|
|
|
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
2017-09-27 15:44:33 +02:00
|
|
|
},
|
|
|
|
sunlight_propagates = true,
|
|
|
|
is_ground_content = true,
|
2022-05-03 21:21:14 +02:00
|
|
|
groups = {crumbly=3, dig_generic=4},
|
2017-09-27 15:44:33 +02:00
|
|
|
})
|
2018-10-25 19:03:25 +02:00
|
|
|
|
|
|
|
if not minetest.get_modpath("moreblocks") or not minetest.get_modpath("gloopblocks") then
|
2022-05-03 21:21:14 +02:00
|
|
|
local graveltex = "[combine:16x16^[noalpha^[colorize:#3a3b3c"
|
|
|
|
if minetest.get_modpath("default") then
|
|
|
|
graveltex = "default_gravel.png"
|
|
|
|
end
|
2018-10-25 19:03:25 +02:00
|
|
|
minetest.register_node("building_blocks:gravel_spread", {
|
|
|
|
drawtype = "raillike",
|
|
|
|
description = S("Gravel Spread"),
|
2022-05-03 21:21:14 +02:00
|
|
|
tiles = {graveltex},
|
2018-10-25 19:03:25 +02:00
|
|
|
inventory_image = "building_blocks_gravel_spread_inv.png",
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
2022-05-03 21:21:14 +02:00
|
|
|
-- but how to specify the dimensions for curved and sideways rails?
|
|
|
|
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
2018-10-25 19:03:25 +02:00
|
|
|
},
|
|
|
|
sunlight_propagates = true,
|
|
|
|
is_ground_content = true,
|
2022-05-03 21:21:14 +02:00
|
|
|
groups = {crumbly=2, dig_generic=4},
|
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_dirt_defaults",
|
|
|
|
},
|
2018-10-25 19:03:25 +02:00
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2017-09-27 17:05:20 +02:00
|
|
|
minetest.register_node("building_blocks:Tarmac_spread", {
|
|
|
|
drawtype = "raillike",
|
|
|
|
description = S("Tarmac Spread"),
|
|
|
|
tiles = {"building_blocks_tar.png"},
|
|
|
|
inventory_image = "building_blocks_tar_spread_inv.png",
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
2022-05-03 21:21:14 +02:00
|
|
|
-- but how to specify the dimensions for curved and sideways rails?
|
|
|
|
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
2017-09-27 17:05:20 +02:00
|
|
|
},
|
|
|
|
sunlight_propagates = true,
|
2017-09-27 15:44:33 +02:00
|
|
|
is_ground_content = true,
|
2022-05-03 21:21:14 +02:00
|
|
|
groups = {cracky=3, dig_generic=4},
|
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_dirt_defaults",
|
|
|
|
},
|
2017-09-27 15:44:33 +02:00
|
|
|
})
|
2017-09-27 17:05:20 +02:00
|
|
|
minetest.register_node("building_blocks:terrycloth_towel", {
|
|
|
|
drawtype = "raillike",
|
|
|
|
description = S("Terrycloth towel"),
|
|
|
|
tiles = {"building_blocks_towel.png"},
|
|
|
|
inventory_image = "building_blocks_towel_inv.png",
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
2022-05-03 21:21:14 +02:00
|
|
|
-- but how to specify the dimensions for curved and sideways rails?
|
|
|
|
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
2017-09-27 17:05:20 +02:00
|
|
|
},
|
|
|
|
sunlight_propagates = true,
|
2017-09-27 15:44:33 +02:00
|
|
|
is_ground_content = true,
|
2022-05-03 21:21:14 +02:00
|
|
|
groups = {crumbly=3, dig_generic=4},
|
2017-09-27 15:44:33 +02:00
|
|
|
})
|
2017-09-27 18:47:58 +02:00
|
|
|
|
|
|
|
minetest.register_node("building_blocks:BWtile", {
|
|
|
|
drawtype = "nodebox",
|
|
|
|
description = S("Chess board tiling"),
|
|
|
|
tiles = {
|
|
|
|
"building_blocks_BWtile.png",
|
|
|
|
"building_blocks_BWtile.png^[transformR90",
|
|
|
|
"building_blocks_BWtile.png^[transformR90",
|
|
|
|
"building_blocks_BWtile.png^[transformR90",
|
|
|
|
"building_blocks_BWtile.png",
|
|
|
|
"building_blocks_BWtile.png"
|
|
|
|
},
|
|
|
|
inventory_image = "building_blocks_bwtile_inv.png",
|
2017-09-27 17:05:20 +02:00
|
|
|
paramtype = "light",
|
2017-09-27 18:47:58 +02:00
|
|
|
walkable = false,
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
|
|
|
},
|
2017-09-27 17:05:20 +02:00
|
|
|
sunlight_propagates = true,
|
2017-09-27 15:44:33 +02:00
|
|
|
is_ground_content = true,
|
2022-05-03 21:21:14 +02:00
|
|
|
groups = {crumbly=3, dig_generic=4},
|
2017-09-27 18:47:58 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("building_blocks:Fireplace", {
|
|
|
|
description = S("Fireplace"),
|
|
|
|
tiles = {
|
|
|
|
"building_blocks_cast_iron.png",
|
|
|
|
"building_blocks_cast_iron.png",
|
|
|
|
"building_blocks_cast_iron.png",
|
|
|
|
"building_blocks_cast_iron_fireplace.png"
|
|
|
|
},
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
2022-05-03 21:21:14 +02:00
|
|
|
light_source = minetest.LIGHT_MAX,
|
2017-09-27 18:47:58 +02:00
|
|
|
sunlight_propagates = true,
|
|
|
|
is_ground_content = true,
|
2022-05-03 21:21:14 +02:00
|
|
|
groups = {cracky=2, dig_generic=4},
|
|
|
|
_sound_def = {
|
|
|
|
key = "node_sound_stone_defaults",
|
|
|
|
},
|
2017-09-28 12:22:53 +02:00
|
|
|
})
|