From: Claire Worley Date: Wed, 25 Nov 2020 03:41:08 +0000 (-0800) Subject: TNT Rain X-Git-Url: http://git.scottworley.com/more_tnt/commitdiff_plain/27558311824cc7335f082dadd73c8b2d3908f350 TNT Rain --- 27558311824cc7335f082dadd73c8b2d3908f350 diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..4ad96d5 --- /dev/null +++ b/depends.txt @@ -0,0 +1 @@ +default diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..5d12385 --- /dev/null +++ b/init.lua @@ -0,0 +1,32 @@ +minetest.register_node("more_tnt:tnt_rain_starter",{ + description="TNT Rain Starter", + groups = {dig_immediate = 2, mesecon = 2, tnt = 1, flammable = 5}, + sounds = default.node_sound_wood_defaults(), + tiles = {"tnt_rain_top.png","tnt_rain_bottom.png","tnt_rain_side.png"}, + on_punch=function(pos,node,puncher) + if puncher:get_wielded_item():get_name() == "default:torch" then + minetest.get_meta(pos):set_int("rain",30) + minetest.get_node_timer(pos):start(.5) + end + end, + on_timer=function (pos,elapsed) + rain=minetest.get_meta(pos):get_int("rain")-1 + if rain < 0 then + minetest.set_node(pos,{name="air"}) + return false + end + minetest.get_meta(pos):set_int("rain",rain) + for i=0,10 do + minetest.set_node({x=pos.x+math.random(-25,25),y=pos.y+10,z=pos.z + math.random(-25,25)},{name="tnt:tnt_burning"}) + end + return true + end +}) + + +minetest.register_craft({ + output="more_tnt:tnt_rain_starter", +recipe={{"tnt:tnt","tnt:tnt","tnt:tnt"}, + {"tnt:tnt","tnt:tnt","tnt:tnt"}, + {"tnt:tnt","tnt:tnt","tnt:tnt"}}, +}) diff --git a/textures/tnt_rain_bottom.png b/textures/tnt_rain_bottom.png new file mode 100644 index 0000000..1186fb5 Binary files /dev/null and b/textures/tnt_rain_bottom.png differ diff --git a/textures/tnt_rain_side.png b/textures/tnt_rain_side.png new file mode 100644 index 0000000..48c4f0a Binary files /dev/null and b/textures/tnt_rain_side.png differ diff --git a/textures/tnt_rain_top.png b/textures/tnt_rain_top.png new file mode 100644 index 0000000..23b2723 Binary files /dev/null and b/textures/tnt_rain_top.png differ