Skip to content
Permalink
Browse files

Add labels to ABMs

Useful for searches and the mod profiler.
  • Loading branch information
tenplus1 authored and paramat committed Aug 8, 2016
1 parent 61a197f commit 619ac5269393534c3f8ad8229514b17aa47eb513
Showing with 16 additions and 0 deletions.
  1. +7 −0 mods/default/functions.lua
  2. +1 −0 mods/farming/nodes.lua
  3. +4 −0 mods/fire/init.lua
  4. +2 −0 mods/flowers/init.lua
  5. +1 −0 mods/stairs/init.lua
  6. +1 −0 mods/tnt/init.lua
@@ -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,

0 comments on commit 619ac52

Please sign in to comment.
You can’t perform that action at this time.