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

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

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

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

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

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