ABMDefinition: update annotations
This commit is contained in:
@@ -1,54 +1,54 @@
|
|||||||
--- @meta
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class ABMDefinition
|
--- @class ABMDefinition
|
||||||
local ABMDefinition = {
|
local ABMDefinition = {
|
||||||
--- Descriptive label for profiling purposes (optional).
|
--- Descriptive label for profiling purposes (optional).
|
||||||
--- Definitions with identical labels will be listed as one.
|
--- Definitions with identical labels will be listed as one.
|
||||||
--- @type string
|
--- @type string?
|
||||||
label = "Lava cooling",
|
label = "Lava cooling",
|
||||||
|
|
||||||
--- Apply `action` function to these nodes.
|
--- Apply `action` function to these nodes.
|
||||||
--- `group:groupname` can also be used here.
|
--- `group:groupname` can also be used here.
|
||||||
--- @type string[]
|
--- @type string[]
|
||||||
nodenames = { "default:lava_source" },
|
nodenames = { "default:lava_source" },
|
||||||
|
|
||||||
--- Only apply `action` to nodes that have one of, or any
|
--- Only apply `action` to nodes that have one of, or any
|
||||||
--- combination of, these neighbors.
|
--- combination of, these neighbors.
|
||||||
--- If left out or empty, any neighbor will do.
|
--- If left out or empty, any neighbor will do.
|
||||||
--- `group:groupname` can also be used here.
|
--- `group:groupname` can also be used here.
|
||||||
--- @type string[]
|
--- @type string[]?
|
||||||
neighbors = { "default:water_source", "default:water_flowing" },
|
neighbors = { "default:water_source", "default:water_flowing" },
|
||||||
|
|
||||||
--- Only apply `action` to nodes that have no one of these neighbors.
|
--- Only apply `action` to nodes that have no one of these neighbors.
|
||||||
--- If left out or empty, it has no effect.
|
--- If left out or empty, it has no effect.
|
||||||
--- `group:groupname` can also be used here.
|
--- `group:groupname` can also be used here.
|
||||||
--- @type string[]
|
--- @type string[]?
|
||||||
without_neighbors = { "default:lava_source", "default:lava_flowing" },
|
without_neighbors = { "default:lava_source", "default:lava_flowing" },
|
||||||
|
|
||||||
--- Operation interval in seconds
|
--- Operation interval in seconds
|
||||||
--- @type number
|
--- @type number
|
||||||
interval = 10.0,
|
interval = 10.0,
|
||||||
|
|
||||||
--- Probability of triggering `action` per-node per-interval is 1.0 / chance (integers only)
|
--- Probability of triggering `action` per-node per-interval is 1.0 / chance
|
||||||
--- @type number
|
--- integer [u32] (value 0 is treated as 1)
|
||||||
chance = 50,
|
--- @type integer
|
||||||
|
chance = 50,
|
||||||
|
|
||||||
--- min and max height levels where ABM will be processed (inclusive)
|
--- min and max height levels where ABM will be processed (inclusive)
|
||||||
--- can be used to reduce CPU usage
|
--- can be used to reduce CPU usage
|
||||||
--- @type number
|
--- @type integer?
|
||||||
min_y = -32768,
|
min_y = -32768,
|
||||||
--- min and max height levels where ABM will be processed (inclusive)
|
--- min and max height levels where ABM will be processed (inclusive)
|
||||||
--- can be used to reduce CPU usage
|
--- can be used to reduce CPU usage
|
||||||
--- @type number
|
--- @type integer?
|
||||||
max_y = 32767,
|
max_y = 32767,
|
||||||
|
|
||||||
--- If true, catch-up behavior is enabled: The `chance` value is
|
--- If true, catch-up behavior is enabled: The `chance` value is
|
||||||
--- temporarily reduced when returning to an area to simulate time lost
|
--- temporarily reduced when returning to an area to simulate time lost
|
||||||
--- by the area being unattended. Note that the `chance` value can often
|
--- by the area being unattended. Note that the `chance` value can often
|
||||||
--- be reduced to 1.
|
--- be reduced to 1.
|
||||||
--- @type boolean
|
--- @type boolean?
|
||||||
catch_up = true,
|
catch_up = true,
|
||||||
|
|
||||||
--- Function triggered for each qualifying node.
|
--- Function triggered for each qualifying node.
|
||||||
--- `active_object_count` is number of active objects in the node's
|
--- `active_object_count` is number of active objects in the node's
|
||||||
@@ -57,6 +57,6 @@ local ABMDefinition = {
|
|||||||
--- mapblock plus all 26 neighboring mapblocks. If any neighboring
|
--- mapblock plus all 26 neighboring mapblocks. If any neighboring
|
||||||
--- mapblocks are unloaded an estimate is calculated for them based on
|
--- mapblocks are unloaded an estimate is calculated for them based on
|
||||||
--- loaded mapblocks.
|
--- loaded mapblocks.
|
||||||
--- @type fun(pos:MapPosition, node:NodeTable, active_object_count:number, active_object_count_wider:number)
|
--- @type fun(pos:MapVector, node:NodeTable, active_object_count:integer, active_object_count_wider:integer)
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider) end,
|
action = function(pos, node, active_object_count, active_object_count_wider) end,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user