forked from luanti-org/minetest_game
		
	TNT: make tnt:burning a falling node.
This allows TNT to be used for e.g. traps (drop it from the ceiling) or weird tnt effects with other explosions.
This commit is contained in:
		| @@ -502,6 +502,7 @@ function tnt.register_tnt(def) | |||||||
| 		light_source = 5, | 		light_source = 5, | ||||||
| 		drop = "", | 		drop = "", | ||||||
| 		sounds = default.node_sound_wood_defaults(), | 		sounds = default.node_sound_wood_defaults(), | ||||||
|  | 		groups = {falling_node = 1}, | ||||||
| 		on_timer = function(pos, elapsed) | 		on_timer = function(pos, elapsed) | ||||||
| 			tnt.boom(pos, def) | 			tnt.boom(pos, def) | ||||||
| 		end, | 		end, | ||||||
| @@ -510,6 +511,7 @@ function tnt.register_tnt(def) | |||||||
| 		on_construct = function(pos) | 		on_construct = function(pos) | ||||||
| 			minetest.sound_play("tnt_ignite", {pos = pos}) | 			minetest.sound_play("tnt_ignite", {pos = pos}) | ||||||
| 			minetest.get_node_timer(pos):start(4) | 			minetest.get_node_timer(pos):start(4) | ||||||
|  | 			nodeupdate(pos) | ||||||
| 		end, | 		end, | ||||||
| 	}) | 	}) | ||||||
| end | end | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user