minetest-mm/mods/techpack/tubelib/basalt.lua

72 lines
1.9 KiB
Lua
Raw Normal View History

2020-11-15 20:25:38 +01:00
--[[
Tube Library
============
2020-11-20 19:20:28 +01:00
Copyright (C) 2017-2020 Joachim Stolberg
2020-11-15 20:25:38 +01:00
2020-11-20 19:20:28 +01:00
AGPL v3
2020-11-15 20:25:38 +01:00
See LICENSE.txt for more information
basalt.lua:
]]--
2020-11-20 19:20:28 +01:00
-- Load support for I18n
local S = tubelib.S
2020-11-15 20:25:38 +01:00
if tubelib.basalt_stone_enabled then
-- Replace default:stone with tubelib:basalt which is useless for ore generation.
default.cool_lava = function(pos, node)
if node.name == "default:lava_source" then
minetest.set_node(pos, {name = "default:obsidian"})
else -- Lava flowing
minetest.set_node(pos, {name = "tubelib:basalt_stone"})
end
minetest.sound_play("default_cool_lava",
{pos = pos, max_hear_distance = 16, gain = 0.25})
end
minetest.register_node("tubelib:basalt_stone", {
2020-11-20 19:20:28 +01:00
description = S("Basalt Stone"),
2020-11-15 20:25:38 +01:00
tiles = {"default_stone.png^[brighten"},
groups = {cracky = 3, stone = 1},
drop = "default:silver_sand",
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("tubelib:basalt_stone_brick", {
2020-11-20 19:20:28 +01:00
description = S("Basalt Stone Brick"),
2020-11-15 20:25:38 +01:00
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_stone_brick.png^[brighten"},
is_ground_content = false,
groups = {cracky = 2, stone = 1},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("tubelib:basalt_stone_block", {
2020-11-20 19:20:28 +01:00
description = S("Basalt Stone Block"),
2020-11-15 20:25:38 +01:00
tiles = {"default_stone_block.png^[brighten"},
is_ground_content = false,
groups = {cracky = 2, stone = 1},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
output = "tubelib:basalt_stone_brick 4",
recipe = {
{"tubelib:basalt_stone", "tubelib:basalt_stone"},
{"tubelib:basalt_stone", "tubelib:basalt_stone"},
}
})
minetest.register_craft({
output = "tubelib:basalt_stone_block 9",
recipe = {
{"tubelib:basalt_stone", "tubelib:basalt_stone", "tubelib:basalt_stone"},
{"tubelib:basalt_stone", "tubelib:basalt_stone", "tubelib:basalt_stone"},
{"tubelib:basalt_stone", "tubelib:basalt_stone", "tubelib:basalt_stone"},
}
})
end