From 696cfe74c1c0c8126f33f8635b3d1b840e6915bf Mon Sep 17 00:00:00 2001 From: Milan* Date: Fri, 26 May 2017 20:15:55 +0200 Subject: [PATCH] initial add hotstone --- hotstone.lua | 21 +++++++++++++++++++++ init.lua | 1 + nodes.lua | 10 ++++++++++ textures/illuna_hotstone.png | Bin 0 -> 577 bytes 4 files changed, 32 insertions(+) create mode 100644 hotstone.lua create mode 100644 textures/illuna_hotstone.png diff --git a/hotstone.lua b/hotstone.lua new file mode 100644 index 0000000..917e77b --- /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 3f4b419..5ef1b1e 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 682d375..8df448f 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 GIT binary patch literal 577 zcmV-H0>1r;P)X* zEeQz>q|gHaY#_)Ye;}kv=QhbV~Fbmzr*jE+1-e>9Y1%cOLf6KWf643Vk zosM@d4GIrr_0ir+SB=<3w;h%uS&C*J_t>ftS#;Y~sDNV