diff options
author | paramat <paramat@users.noreply.github.com> | 2018-01-12 00:32:55 +0000 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2018-01-12 05:45:39 +0000 |
commit | 05e9e128b927e5eea7f7d4ed005aed58cbbeafdc (patch) | |
tree | 2da7b5e12b764825155fcbada914b00310ce3717 /doc | |
parent | b8fc6a19554a452b47dc664a1d7ab7bdd1c12d5a (diff) | |
download | minetest-05e9e128b927e5eea7f7d4ed005aed58cbbeafdc.tar.gz minetest-05e9e128b927e5eea7f7d4ed005aed58cbbeafdc.tar.bz2 minetest-05e9e128b927e5eea7f7d4ed005aed58cbbeafdc.zip |
Lua_api.txt: Improve and complete ABM documentation
Document 'active object count (wider)'.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index f0b22858a..1a0e75e19 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -4438,19 +4438,30 @@ Definition tables { label = "Lava cooling", - -- ^ Descriptive label for profiling purposes (optional). - -- Definitions with identical labels will be listed as one. - -- In the following two fields, also group:groupname will work. + ^ Descriptive label for profiling purposes (optional). + Definitions with identical labels will be listed as one. nodenames = {"default:lava_source"}, - neighbors = {"default:water_source", "default:water_flowing"}, -- Any of these --[[ - ^ If left out or empty, any neighbor will do ]] - interval = 1.0, -- Operation interval in seconds - chance = 1, -- Chance of trigger per-node per-interval is 1.0 / this - catch_up = true, -- If true, catch-up behaviour is enabled --[[ - ^ The chance value is temporarily reduced when returning to - an area to simulate time lost by the area being unattended. - ^ Note chance value can often be reduced to 1 ]] - action = func(pos, node, active_object_count, active_object_count_wider), + ^ Apply `action` function to these nodes. + ^ `group:groupname` can also be used here. + neighbors = {"default:water_source", "default:water_flowing"}, + ^ Only apply `action` to nodes that have one of, or any + combination of, these neighbors. + ^ If left out or empty, any neighbor will do. + ^ `group:groupname` can also be used here. + interval = 1.0, + ^ Operation interval in seconds. + chance = 1, + ^ Chance of triggering `action` per-node per-interval is 1.0 / this value. + catch_up = true, + ^ If true, catch-up behaviour is enabled: The `chance` value is temporarily + reduced when returning to an area to simulate time lost by the area being + unattended. Note that the `chance` value can often be reduced to 1. + action = function(pos, node, active_object_count, active_object_count_wider), + ^ Function triggered for each qualifying node. + ^ `active_object_count` is number of active objects in the node's mapblock. + ^ `active_object_count_wider` is number of active objects in the node's + mapblock plus all 26 neighboring mapblocks. If any neighboring mapblocks + are unloaded an estmate is calculated for them based on loaded mapblocks. } ### LBM (LoadingBlockModifier) definition (`register_lbm`) |