initial add hotstone

This commit is contained in:
Milan* 2017-05-26 20:15:55 +02:00
parent 949a2a286d
commit 696cfe74c1
4 changed files with 32 additions and 0 deletions

21
hotstone.lua Normal file
View File

@ -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,
})

View File

@ -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

View File

@ -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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B