diff --git a/hotstone.lua b/hotstone.lua new file mode 100644 index 0000000000000000000000000000000000000000..917e77bfe06ac1f308f71192d1f0964e2a813395 --- /dev/null +++ b/hotstone.lua @@ -0,0 +1,21 @@ +-- 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 + nodeupdate(pos) + end, +}) + diff --git a/init.lua b/init.lua index 3f4b419421db9180731e7133c4785ccda98dd7b9..5ef1b1e8c384cc60d3807ef633e8899a7d1ecefb 100644 --- a/init.lua +++ b/init.lua @@ -8,6 +8,7 @@ dofile(minetest.get_modpath("illuna").."/aliases.lua") dofile(minetest.get_modpath("illuna").."/craftitems.lua") dofile(minetest.get_modpath("illuna").."/shop.lua") dofile(minetest.get_modpath("illuna").."/stairs.lua") +dofile(minetest.get_modpath("illuna").."/hotstone.lua") if minetest.get_modpath("moreblocks") then dofile(minetest.get_modpath("illuna").."/moreblocks.lua") end diff --git a/nodes.lua b/nodes.lua index 682d3756484c13a7e24dc0f1c6b62c4b1785a858..8df448f2069d240ce8a42db69d995da696a29cda 100644 --- a/nodes.lua +++ b/nodes.lua @@ -37,6 +37,16 @@ minetest.register_node("illuna:moonbrick", { sounds = default.node_sound_stone_defaults(), }) +minetest.register_node("illuna:hotstone", { + description = "Hot Stone", + paramtype2 = "facedir", + tiles = {"illuna_hotstone.png"}, + groups = {choppy=2, igniter = 1}, + light_source = 4, + damage_per_second = 6, + sounds = default.node_sound_stone_defaults(), +}) + function illuna.teamconstruct(pos) minetest.add_entity({x=pos.x, y=pos.y+1.35, z=pos.z}, "illuna:teamlist") local timer = minetest.get_node_timer(pos) diff --git a/textures/illuna_hotstone.png b/textures/illuna_hotstone.png new file mode 100644 index 0000000000000000000000000000000000000000..1f83b55374b6caea56320ed8e53e276f4c45d09c Binary files /dev/null and b/textures/illuna_hotstone.png differ