From 7d37913ea4f83807c508cec81b39744d69f481f8 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 3 Dec 2011 18:18:59 +0200 Subject: Add ABM required neighbor check --- data/mods/default/init.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'data/mods/default') diff --git a/data/mods/default/init.lua b/data/mods/default/init.lua index 2e07b5412..7383996b1 100644 --- a/data/mods/default/init.lua +++ b/data/mods/default/init.lua @@ -73,6 +73,7 @@ -- minetest.register_node(name, node definition) -- minetest.register_craftitem(name, craftitem definition) -- minetest.register_craft(recipe) +-- minetest.register_abm(abm definition) -- minetest.register_globalstep(func(dtime)) -- minetest.register_on_placenode(func(pos, newnode, placer)) -- minetest.register_on_dignode(func(pos, oldnode, digger)) @@ -285,6 +286,16 @@ -- } -- } -- +-- ABM (ActiveBlockModifier) definition: +-- { +-- nodenames = {"lava_source"}, +-- neighbors = {"water_source", "water_flowing"}, -- (any of these) +-- ^ If left out or empty, any neighbor will do +-- ^ This might get removed in the future +-- interval = 1.0, -- (operation interval) +-- chance = 1, -- (chance of trigger is 1.0/this) +-- action = func(pos, node, active_object_count, active_object_count_wider), +-- } -- print("minetest dump: "..dump(minetest)) -- cgit v1.2.3