forked from luanti-org/minetest_game
		
	Default, fire: Disable catch-up in some ABMs
To avoid processing spikes where catch-up is non-essential Disable in: Lavacooling, grass growing, grass removal and all fire mod ABMs
This commit is contained in:
		| @@ -105,6 +105,7 @@ minetest.register_abm({ | |||||||
| 	neighbors = {"group:water"}, | 	neighbors = {"group:water"}, | ||||||
| 	interval = 1, | 	interval = 1, | ||||||
| 	chance = 2, | 	chance = 2, | ||||||
|  | 	catch_up = false, | ||||||
| 	action = function(...) | 	action = function(...) | ||||||
| 		default.cool_lava_flowing(...) | 		default.cool_lava_flowing(...) | ||||||
| 	end, | 	end, | ||||||
| @@ -115,6 +116,7 @@ minetest.register_abm({ | |||||||
| 	neighbors = {"group:water"}, | 	neighbors = {"group:water"}, | ||||||
| 	interval = 1, | 	interval = 1, | ||||||
| 	chance = 2, | 	chance = 2, | ||||||
|  | 	catch_up = false, | ||||||
| 	action = function(...) | 	action = function(...) | ||||||
| 		default.cool_lava_source(...) | 		default.cool_lava_source(...) | ||||||
| 	end, | 	end, | ||||||
| @@ -313,6 +315,7 @@ minetest.register_abm({ | |||||||
| 	nodenames = {"default:dirt"}, | 	nodenames = {"default:dirt"}, | ||||||
| 	interval = 2, | 	interval = 2, | ||||||
| 	chance = 200, | 	chance = 200, | ||||||
|  | 	catch_up = false, | ||||||
| 	action = function(pos, node) | 	action = function(pos, node) | ||||||
| 		local above = {x = pos.x, y = pos.y + 1, z = pos.z} | 		local above = {x = pos.x, y = pos.y + 1, z = pos.z} | ||||||
| 		local name = minetest.get_node(above).name | 		local name = minetest.get_node(above).name | ||||||
| @@ -338,6 +341,7 @@ minetest.register_abm({ | |||||||
| 	nodenames = {"default:dirt_with_grass", "default:dirt_with_dry_grass"}, | 	nodenames = {"default:dirt_with_grass", "default:dirt_with_dry_grass"}, | ||||||
| 	interval = 2, | 	interval = 2, | ||||||
| 	chance = 20, | 	chance = 20, | ||||||
|  | 	catch_up = false, | ||||||
| 	action = function(pos, node) | 	action = function(pos, node) | ||||||
| 		local above = {x = pos.x, y = pos.y + 1, z = pos.z} | 		local above = {x = pos.x, y = pos.y + 1, z = pos.z} | ||||||
| 		local name = minetest.get_node(above).name | 		local name = minetest.get_node(above).name | ||||||
|   | |||||||
| @@ -171,6 +171,7 @@ minetest.register_abm({ | |||||||
| 	neighbors = {"group:puts_out_fire"}, | 	neighbors = {"group:puts_out_fire"}, | ||||||
| 	interval = 3, | 	interval = 3, | ||||||
| 	chance = 2, | 	chance = 2, | ||||||
|  | 	catch_up = false, | ||||||
| 	action = function(p0, node, _, _) | 	action = function(p0, node, _, _) | ||||||
| 		minetest.remove_node(p0) | 		minetest.remove_node(p0) | ||||||
| 		minetest.sound_play("fire_extinguish_flame", | 		minetest.sound_play("fire_extinguish_flame", | ||||||
| @@ -189,6 +190,7 @@ if minetest.setting_getbool("disable_fire") then | |||||||
| 		nodenames = {"fire:basic_flame"}, | 		nodenames = {"fire:basic_flame"}, | ||||||
| 		interval = 7, | 		interval = 7, | ||||||
| 		chance = 2, | 		chance = 2, | ||||||
|  | 		catch_up = false, | ||||||
| 		action = function(p0, node, _, _) | 		action = function(p0, node, _, _) | ||||||
| 			minetest.remove_node(p0) | 			minetest.remove_node(p0) | ||||||
| 		end, | 		end, | ||||||
| @@ -203,6 +205,7 @@ else | |||||||
| 		neighbors = {"group:igniter"}, | 		neighbors = {"group:igniter"}, | ||||||
| 		interval = 7, | 		interval = 7, | ||||||
| 		chance = 16, | 		chance = 16, | ||||||
|  | 		catch_up = false, | ||||||
| 		action = function(p0, node, _, _) | 		action = function(p0, node, _, _) | ||||||
| 			-- If there is water or stuff like that around node, don't ignite | 			-- If there is water or stuff like that around node, don't ignite | ||||||
| 			if fire.flame_should_extinguish(p0) then | 			if fire.flame_should_extinguish(p0) then | ||||||
| @@ -221,6 +224,7 @@ else | |||||||
| 		nodenames = {"fire:basic_flame"}, | 		nodenames = {"fire:basic_flame"}, | ||||||
| 		interval = 5, | 		interval = 5, | ||||||
| 		chance = 16, | 		chance = 16, | ||||||
|  | 		catch_up = false, | ||||||
| 		action = function(p0, node, _, _) | 		action = function(p0, node, _, _) | ||||||
| 			-- If there are no flammable nodes around flame, remove flame | 			-- If there are no flammable nodes around flame, remove flame | ||||||
| 			if not minetest.find_node_near(p0, 1, {"group:flammable"}) then | 			if not minetest.find_node_near(p0, 1, {"group:flammable"}) then | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user