From da3205837bec16bc05b3377d01ef7ff9f0fa1dfe Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 15 May 2017 00:45:54 +0200 Subject: [PATCH] Add label to all ABMs --- mods/ENTITIES/drippingwater/init.lua | 8 ++++++-- mods/ENTITIES/mobs/spawner.lua | 1 + mods/ENVIRONMENT/weather_pack/rain.lua | 3 +++ .../REDSTONE/mesecons_solarpanel/init.lua | 20 +++++++++++-------- mods/ITEMS/REDSTONE/mesecons_torch/init.lua | 1 + mods/ITEMS/mcl_cocoas/init.lua | 1 + mods/ITEMS/mcl_core/functions.lua | 13 ++++++++++++ mods/ITEMS/mcl_farming/shared_functions.lua | 1 + mods/ITEMS/mcl_hoppers/init.lua | 3 +++ mods/ITEMS/mcl_nether/nether_wart.lua | 1 + 10 files changed, 42 insertions(+), 10 deletions(-) diff --git a/mods/ENTITIES/drippingwater/init.lua b/mods/ENTITIES/drippingwater/init.lua index 13e83677d4..7888e16ea1 100644 --- a/mods/ENTITIES/drippingwater/init.lua +++ b/mods/ENTITIES/drippingwater/init.lua @@ -84,7 +84,9 @@ minetest.register_entity("drippingwater:drop_lava", { --Create drop minetest.register_abm( - {nodenames = {"group:solid"}, + { + label = "Create water drops", + nodenames = {"group:solid"}, neighbors = {"group:water"}, interval = 2, chance = 22, @@ -100,7 +102,9 @@ minetest.register_abm( --Create lava drop minetest.register_abm( - {nodenames = {"group:solid"}, + { + label = "Create lava drops", + nodenames = {"group:solid"}, neighbors = {"group:lava"}, interval = 2, chance = 22, diff --git a/mods/ENTITIES/mobs/spawner.lua b/mods/ENTITIES/mobs/spawner.lua index fdf5164022..009ebbf67c 100644 --- a/mods/ENTITIES/mobs/spawner.lua +++ b/mods/ENTITIES/mobs/spawner.lua @@ -80,6 +80,7 @@ minetest.register_node("mobs:spawner", { -- spawner abm minetest.register_abm({ + label = "Monster Spawner spawning a monster", nodenames = {"mobs:spawner"}, interval = 10, chance = 4, diff --git a/mods/ENVIRONMENT/weather_pack/rain.lua b/mods/ENVIRONMENT/weather_pack/rain.lua index c3c49b465b..2045c7fadf 100644 --- a/mods/ENVIRONMENT/weather_pack/rain.lua +++ b/mods/ENVIRONMENT/weather_pack/rain.lua @@ -173,6 +173,7 @@ end if weather.allow_abm then -- ABM for extinguish fire minetest.register_abm({ + label = "Rain extinguishes fire", nodenames = {"mcl_fire:fire"}, interval = 4.0, chance = 2, @@ -188,6 +189,7 @@ if weather.allow_abm then -- Slowly fill up cauldrons minetest.register_abm({ + label = "Rain fills cauldrons with water", nodenames = {"mcl_cauldrons:cauldron", "mcl_cauldrons:cauldron_1", "mcl_cauldrons:cauldron_2"}, interval = 56.0, chance = 1, @@ -206,6 +208,7 @@ if weather.allow_abm then -- Wetten the soil minetest.register_abm({ + label = "Rain hydrates farmland", nodenames = {"mcl_farming:soil"}, interval = 22.0, chance = 3, diff --git a/mods/ITEMS/REDSTONE/mesecons_solarpanel/init.lua b/mods/ITEMS/REDSTONE/mesecons_solarpanel/init.lua index d67d9f52a0..c628d42b4c 100644 --- a/mods/ITEMS/REDSTONE/mesecons_solarpanel/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_solarpanel/init.lua @@ -75,8 +75,9 @@ minetest.register_craft({ } }) -minetest.register_abm( - {nodenames = {"mesecons_solarpanel:solar_panel_off"}, +minetest.register_abm({ + label = "Daylight turns on solar panels", + nodenames = {"mesecons_solarpanel:solar_panel_off"}, interval = 1, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) @@ -89,8 +90,9 @@ minetest.register_abm( end, }) -minetest.register_abm( - {nodenames = {"mesecons_solarpanel:solar_panel_on"}, +minetest.register_abm({ + label = "Darkness turns off solar panels", + nodenames = {"mesecons_solarpanel:solar_panel_on"}, interval = 1, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) @@ -172,8 +174,9 @@ minetest.register_node("mesecons_solarpanel:solar_panel_inverted_off", { _mcl_hardness = 0.2, }) -minetest.register_abm( - {nodenames = {"mesecons_solarpanel:solar_panel_inverted_off"}, +minetest.register_abm({ + label = "Darkness turns on inverted solar panels", + nodenames = {"mesecons_solarpanel:solar_panel_inverted_off"}, interval = 1, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) @@ -186,8 +189,9 @@ minetest.register_abm( end, }) -minetest.register_abm( - {nodenames = {"mesecons_solarpanel:solar_panel_inverted_on"}, +minetest.register_abm({ + label = "Daylight turns off inverted solar panels", + nodenames = {"mesecons_solarpanel:solar_panel_inverted_on"}, interval = 1, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) diff --git a/mods/ITEMS/REDSTONE/mesecons_torch/init.lua b/mods/ITEMS/REDSTONE/mesecons_torch/init.lua index 79e7225848..f679033630 100644 --- a/mods/ITEMS/REDSTONE/mesecons_torch/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_torch/init.lua @@ -120,6 +120,7 @@ minetest.register_craft({ }) minetest.register_abm({ + label = "Redstone torch inversion", nodenames = {"mesecons_torch:mesecon_torch_off","mesecons_torch:mesecon_torch_off_wall","mesecons_torch:mesecon_torch_on","mesecons_torch:mesecon_torch_on_wall"}, interval = 1, chance = 1, diff --git a/mods/ITEMS/mcl_cocoas/init.lua b/mods/ITEMS/mcl_cocoas/init.lua index 81a4af876e..3da58536a6 100644 --- a/mods/ITEMS/mcl_cocoas/init.lua +++ b/mods/ITEMS/mcl_cocoas/init.lua @@ -231,6 +231,7 @@ minetest.register_on_generated(function(minp, maxp) end) minetest.register_abm({ + label = "Cocoa growth", nodenames = {"mcl_cocoas:cocoa_1", "mcl_cocoas:cocoa_2"}, -- Same as potatoes -- TODO: Tweak/balance the growth speed diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index 998b6112da..b648060aa5 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -11,6 +11,7 @@ mcl_core.cool_lava_flowing = function(pos) end minetest.register_abm({ + label = "Flowing lava cooling", nodenames = {"mcl_core:lava_flowing"}, neighbors = {"group:water"}, interval = 1, @@ -21,6 +22,7 @@ minetest.register_abm({ }) minetest.register_abm({ + label = "Lava source cooling", nodenames = {"mcl_core:lava_source"}, neighbors = {"group:water"}, interval = 1, @@ -93,6 +95,7 @@ end -- Remove attached nodes next to and below water. -- TODO: This is just an approximation! Attached nodes should be removed if water wants to flow INTO that space. minetest.register_abm({ + label = "Detach dig_by_water nodes near water", nodenames = {"group:dig_by_water"}, neighbors = {"group:water"}, interval = 1, @@ -125,6 +128,7 @@ minetest.register_abm({ }) minetest.register_abm({ + label = "Cactus growth", nodenames = {"mcl_core:cactus"}, neighbors = {"group:sand"}, interval = 25, @@ -135,6 +139,7 @@ minetest.register_abm({ }) minetest.register_abm({ + label = "Sugar canes growth", nodenames = {"mcl_core:reeds"}, neighbors = {"group:soil_sugarcane"}, interval = 25, @@ -534,6 +539,7 @@ end -- Oak tree minetest.register_abm({ + label = "Oak tree growth", nodenames = {"mcl_core:sapling"}, neighbors = {"group:soil_sapling"}, interval = 20, @@ -543,6 +549,7 @@ minetest.register_abm({ -- Dark oak tree minetest.register_abm({ + label = "Dark oak tree growth", nodenames = {"mcl_core:darksapling"}, neighbors = {"group:soil_sapling"}, interval = 20, @@ -552,6 +559,7 @@ minetest.register_abm({ -- Jungle Tree minetest.register_abm({ + label = "Jungle tree growth", nodenames = {"mcl_core:junglesapling"}, neighbors = {"group:soil_sapling"}, interval = 20, @@ -561,6 +569,7 @@ minetest.register_abm({ -- Spruce tree minetest.register_abm({ + label = "Spruce tree growth", nodenames = {"mcl_core:sprucesapling"}, neighbors = {"group:soil_sapling"}, interval = 20, @@ -570,6 +579,7 @@ minetest.register_abm({ -- Birch tree minetest.register_abm({ + label = "Birch tree growth", nodenames = {"mcl_core:birchsapling"}, neighbors = {"group:soil_sapling"}, interval = 20, @@ -579,6 +589,7 @@ minetest.register_abm({ -- Acacia tree minetest.register_abm({ + label = "Acacia tree growth", nodenames = {"mcl_core:acaciasapling"}, neighbors = {"group:soil_sapling"}, interval = 20, @@ -590,6 +601,7 @@ minetest.register_abm({ -- Vine generating -- --------------------- minetest.register_abm({ + label = "Vines growth", nodenames = {"mcl_core:vine"}, interval = 80, chance = 5, @@ -630,6 +642,7 @@ minetest.register_globalstep(function(dtime) 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 diff --git a/mods/ITEMS/mcl_farming/shared_functions.lua b/mods/ITEMS/mcl_farming/shared_functions.lua index c9a2c3c695..24efd4a29c 100644 --- a/mods/ITEMS/mcl_farming/shared_functions.lua +++ b/mods/ITEMS/mcl_farming/shared_functions.lua @@ -5,6 +5,7 @@ function mcl_farming:add_plant(identifier, full_grown, names, interval, chance) plant_lists[identifier].full_grown = full_grown plant_lists[identifier].names = names minetest.register_abm({ + label = string.format("Farming plant growth (%s)", identifier), nodenames = names, interval = interval, chance = chance, diff --git a/mods/ITEMS/mcl_hoppers/init.lua b/mods/ITEMS/mcl_hoppers/init.lua index c7e59ebab4..e749512838 100644 --- a/mods/ITEMS/mcl_hoppers/init.lua +++ b/mods/ITEMS/mcl_hoppers/init.lua @@ -201,6 +201,7 @@ minetest.register_node("mcl_hoppers:hopper_side", { -- Make hoppers suck in dropped items minetest.register_abm({ + label = "Hoppers suck in dropped items", nodenames = {"mcl_hoppers:hopper","mcl_hoppers:hopper_side"}, interval = 1.0, chance = 1, @@ -253,6 +254,7 @@ local is_not_shulker_box = function(itemstack) end minetest.register_abm({ + label = "Hopper/container item exchange", nodenames = {"mcl_hoppers:hopper"}, neighbors = {"group:container"}, interval = 1.0, @@ -296,6 +298,7 @@ minetest.register_abm({ minetest.register_abm({ + label = "Side-hopper/container item exchange", nodenames = {"mcl_hoppers:hopper_side"}, neighbors = {"group:container"}, interval = 1.0, diff --git a/mods/ITEMS/mcl_nether/nether_wart.lua b/mods/ITEMS/mcl_nether/nether_wart.lua index 30414f79c4..b2f656fbe7 100644 --- a/mods/ITEMS/mcl_nether/nether_wart.lua +++ b/mods/ITEMS/mcl_nether/nether_wart.lua @@ -130,6 +130,7 @@ minetest.register_craftitem("mcl_nether:nether_wart_item", { local names = {"mcl_nether:nether_wart_0", "mcl_nether:nether_wart_1", "mcl_nether:nether_wart_2"} minetest.register_abm({ + label = "Nether wart growth", nodenames = {"mcl_nether:nether_wart_0", "mcl_nether:nether_wart_1", "mcl_nether:nether_wart_2"}, neighbors = {"group:soil_nether_wart"}, interval = 35,