aestivalserver-mods/illuna_aestival/src/hotstone.lua

43 lines
1008 B
Lua
Executable File

-- TODO: make it a timer
--
minetest.register_abm({
label = "Illuna Hotstone",
nodenames = {
"default:stone"
},
neighbors = {
"default:lava_source"
},
interval = 5,
chance = 4,
catch_up = false,
action = function(pos, node)
if node.name == "default:stone" then
minetest.swap_node(pos, {name = "illuna:hotstone"})
end
end,
})
minetest.register_node(":illuna:hotstone", {
description = "Hot Stone",
paramtype2 = "facedir",
tiles = {"illuna_hotstone.png"},
groups = {cracky = 2, igniter = 1, stone = 1},
light_source = 4,
damage_per_second = 6,
drop = "caverealms:hot_cobble",
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node(":caverealms:hot_cobble", {
description = "Hot Cobble",
tiles = {"caverealms_hot_cobble.png"},
is_ground_content = true,
groups = {cracky=2, hot=1},
damage_per_second = 1,
light_source = 3,
sounds = default.node_sound_stone_defaults({
footstep = {name="default_stone_footstep", gain=0.25},
}),
})