Skip to content

Commit 36d18cb

Browse files
tenplus1paramat
authored andcommittedFeb 18, 2016
added timer to tnt:tnt_burning for explosions
By adding the timer to the tnt:tnt_burning node it will help mods add the block and cause an explosion after 4 seconds instead of doing nothing like in it's current state.
1 parent b47a556 commit 36d18cb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

Diff for: ‎mods/tnt/init.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ minetest.register_node("tnt:tnt", {
234234
if puncher:get_wielded_item():get_name() == "default:torch" then
235235
minetest.sound_play("tnt_ignite", {pos=pos})
236236
minetest.set_node(pos, {name="tnt:tnt_burning"})
237-
minetest.get_node_timer(pos):start(4)
238237
end
239238
end,
240239
on_blast = function(pos, intensity)
@@ -258,6 +257,9 @@ minetest.register_node("tnt:tnt_burning", {
258257
light_source = 5,
259258
drop = "",
260259
sounds = default.node_sound_wood_defaults(),
260+
on_construct = function(pos)
261+
minetest.get_node_timer(pos):start(4)
262+
end,
261263
on_timer = boom,
262264
-- unaffected by explosions
263265
on_blast = function() end,

0 commit comments

Comments
 (0)