@@ -226,10 +226,10 @@ minetest.register_abm({
226
226
interval = 3 ,
227
227
chance = 1 ,
228
228
catch_up = false ,
229
- action = function (p0 , node , _ , _ )
230
- minetest .remove_node (p0 )
229
+ action = function (pos , node , active_object_count , active_object_count_wider )
230
+ minetest .remove_node (pos )
231
231
minetest .sound_play (" fire_extinguish_flame" ,
232
- {pos = p0 , max_hear_distance = 16 , gain = 0.25 })
232
+ {pos = pos , max_hear_distance = 16 , gain = 0.25 })
233
233
end ,
234
234
})
235
235
@@ -245,9 +245,7 @@ if minetest.setting_getbool("disable_fire") then
245
245
interval = 7 ,
246
246
chance = 1 ,
247
247
catch_up = false ,
248
- action = function (p0 , node , _ , _ )
249
- minetest .remove_node (p0 )
250
- end ,
248
+ action = minetest .remove_node ,
251
249
})
252
250
253
251
else
@@ -260,12 +258,12 @@ else
260
258
interval = 7 ,
261
259
chance = 12 ,
262
260
catch_up = false ,
263
- action = function (p0 , node , _ , _ )
261
+ action = function (pos , node , active_object_count , active_object_count_wider )
264
262
-- If there is water or stuff like that around node, don't ignite
265
- if minetest .find_node_near (p0 , 1 , {" group:puts_out_fire" }) then
263
+ if minetest .find_node_near (pos , 1 , {" group:puts_out_fire" }) then
266
264
return
267
265
end
268
- local p = minetest .find_node_near (p0 , 1 , {" air" })
266
+ local p = minetest .find_node_near (pos , 1 , {" air" })
269
267
if p then
270
268
minetest .set_node (p , {name = " fire:basic_flame" })
271
269
end
280
278
interval = 5 ,
281
279
chance = 18 ,
282
280
catch_up = false ,
283
- action = function (p0 , node , _ , _ )
284
- local p = minetest .find_node_near (p0 , 1 , {" group:flammable" })
281
+ action = function (pos , node , active_object_count , active_object_count_wider )
282
+ local p = minetest .find_node_near (pos , 1 , {" group:flammable" })
285
283
if p then
286
284
-- remove flammable nodes around flame
287
285
local flammable_node = minetest .get_node (p )
@@ -309,13 +307,13 @@ minetest.register_abm({
309
307
neighbors = {"air"},
310
308
interval = 5,
311
309
chance = 10,
312
- action = function(p0 , node, _, _ )
310
+ action = function(pos , node, active_object_count, active_object_count_wider )
313
311
local reg = minetest.registered_nodes[node.name]
314
312
if not reg or not reg.groups.igniter or reg.groups.igniter < 2 then
315
313
return
316
314
end
317
315
local d = reg.groups.igniter
318
- local p = minetest.find_node_near(p0 , d, {"group:flammable"})
316
+ local p = minetest.find_node_near(pos , d, {"group:flammable"})
319
317
if p then
320
318
-- If there is water or stuff like that around flame, don't ignite
321
319
if fire.flame_should_extinguish(p) then
0 commit comments