Add labels to ABMs

Useful for searches and the mod profiler.
This commit is contained in:
tenplus1 2016-08-08 10:56:13 +01:00 committed by paramat
parent 61a197ffd8
commit 619ac52693
6 changed files with 16 additions and 0 deletions

@ -111,6 +111,7 @@ default.cool_lava = function(pos, node)
end end
minetest.register_abm({ minetest.register_abm({
label = "Lava cooling",
nodenames = {"default:lava_source", "default:lava_flowing"}, nodenames = {"default:lava_source", "default:lava_flowing"},
neighbors = {"group:water"}, neighbors = {"group:water"},
interval = 1, interval = 1,
@ -189,6 +190,7 @@ function default.grow_papyrus(pos, node)
end end
minetest.register_abm({ minetest.register_abm({
label = "Grow cactus",
nodenames = {"default:cactus"}, nodenames = {"default:cactus"},
neighbors = {"group:sand"}, neighbors = {"group:sand"},
interval = 12, interval = 12,
@ -199,6 +201,7 @@ minetest.register_abm({
}) })
minetest.register_abm({ minetest.register_abm({
label = "Grow papyrus",
nodenames = {"default:papyrus"}, nodenames = {"default:papyrus"},
neighbors = {"default:dirt", "default:dirt_with_grass"}, neighbors = {"default:dirt", "default:dirt_with_grass"},
interval = 14, interval = 14,
@ -303,6 +306,7 @@ default.after_place_leaves = function(pos, placer, itemstack, pointed_thing)
end end
minetest.register_abm({ minetest.register_abm({
label = "Leaf decay",
nodenames = {"group:leafdecay"}, nodenames = {"group:leafdecay"},
neighbors = {"air", "group:liquid"}, neighbors = {"air", "group:liquid"},
-- A low interval and a high inverse chance spreads the load -- A low interval and a high inverse chance spreads the load
@ -384,6 +388,7 @@ minetest.register_abm({
-- --
minetest.register_abm({ minetest.register_abm({
label = "Grass spread",
nodenames = {"default:dirt"}, nodenames = {"default:dirt"},
neighbors = { neighbors = {
"default:dirt_with_grass", "default:dirt_with_grass",
@ -440,6 +445,7 @@ minetest.register_abm({
-- --
minetest.register_abm({ minetest.register_abm({
label = "Grass covered",
nodenames = { nodenames = {
"default:dirt_with_grass", "default:dirt_with_grass",
"default:dirt_with_dry_grass", "default:dirt_with_dry_grass",
@ -466,6 +472,7 @@ minetest.register_abm({
-- --
minetest.register_abm({ minetest.register_abm({
label = "Moss growth",
nodenames = {"default:cobble", "stairs:slab_cobble", "stairs:stair_cobble"}, nodenames = {"default:cobble", "stairs:slab_cobble", "stairs:stair_cobble"},
neighbors = {"group:water"}, neighbors = {"group:water"},
interval = 16, interval = 16,

@ -94,6 +94,7 @@ minetest.register_node("farming:straw", {
}) })
minetest.register_abm({ minetest.register_abm({
label = "Farming soil",
nodenames = {"group:field"}, nodenames = {"group:field"},
interval = 15, interval = 15,
chance = 4, chance = 4,

@ -221,6 +221,7 @@ end
-- Extinguish all flames quickly with water, snow, ice -- Extinguish all flames quickly with water, snow, ice
minetest.register_abm({ minetest.register_abm({
label = "Extinguish flame",
nodenames = {"fire:basic_flame", "fire:permanent_flame"}, nodenames = {"fire:basic_flame", "fire:permanent_flame"},
neighbors = {"group:puts_out_fire"}, neighbors = {"group:puts_out_fire"},
interval = 3, interval = 3,
@ -241,6 +242,7 @@ if minetest.setting_getbool("disable_fire") then
-- Remove basic flames only -- Remove basic flames only
minetest.register_abm({ minetest.register_abm({
label = "Remove disabled fire",
nodenames = {"fire:basic_flame"}, nodenames = {"fire:basic_flame"},
interval = 7, interval = 7,
chance = 1, chance = 1,
@ -253,6 +255,7 @@ else
-- Ignite neighboring nodes, add basic flames -- Ignite neighboring nodes, add basic flames
minetest.register_abm({ minetest.register_abm({
label = "Ignite flame",
nodenames = {"group:flammable"}, nodenames = {"group:flammable"},
neighbors = {"group:igniter"}, neighbors = {"group:igniter"},
interval = 7, interval = 7,
@ -273,6 +276,7 @@ else
-- Remove flammable nodes -- Remove flammable nodes
minetest.register_abm({ minetest.register_abm({
label = "Remove flammable nodes",
nodenames = {"fire:basic_flame"}, nodenames = {"fire:basic_flame"},
neighbors = "group:flammable", neighbors = "group:flammable",
interval = 5, interval = 5,

@ -110,6 +110,7 @@ function flowers.flower_spread(pos, node)
end end
minetest.register_abm({ minetest.register_abm({
label = "Flower spread",
nodenames = {"group:flora"}, nodenames = {"group:flora"},
neighbors = {"default:dirt_with_grass", "default:dirt_with_dry_grass", neighbors = {"default:dirt_with_grass", "default:dirt_with_dry_grass",
"default:desert_sand"}, "default:desert_sand"},
@ -167,6 +168,7 @@ minetest.register_node("flowers:mushroom_brown", {
-- Mushroom spread and death -- Mushroom spread and death
minetest.register_abm({ minetest.register_abm({
label = "Mushroom spread",
nodenames = {"flowers:mushroom_brown", "flowers:mushroom_red"}, nodenames = {"flowers:mushroom_brown", "flowers:mushroom_red"},
interval = 11, interval = 11,
chance = 50, chance = 50,

@ -236,6 +236,7 @@ end
if replace then if replace then
minetest.register_abm({ minetest.register_abm({
label = "Slab replace",
nodenames = {"group:slabs_replace"}, nodenames = {"group:slabs_replace"},
interval = 16, interval = 16,
chance = 1, chance = 1,

@ -506,6 +506,7 @@ if enable_tnt then
}) })
minetest.register_abm({ minetest.register_abm({
label = "TNT ignition",
nodenames = {"group:tnt", "tnt:gunpowder"}, nodenames = {"group:tnt", "tnt:gunpowder"},
neighbors = {"fire:basic_flame", "default:lava_source", "default:lava_flowing"}, neighbors = {"fire:basic_flame", "default:lava_source", "default:lava_flowing"},
interval = 4, interval = 4,