mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Reuse changable logic from #14258.
This commit is contained in:
parent
aba2b6638e
commit
22fc23fc51
15 changed files with 319 additions and 111 deletions
|
@ -5810,6 +5810,8 @@ Utilities
|
|||
remove_item_match_meta = true,
|
||||
-- The HTTP API supports the HEAD and PATCH methods (5.12.0)
|
||||
httpfetch_additional_methods = true,
|
||||
-- Registered and named ABM can be changed on fly (5.13.0)
|
||||
abm_changeable = true,
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6034,6 +6036,9 @@ Call these functions only at load time!
|
|||
according to its nature (e.g. `core.registered_nodes`)
|
||||
* `core.register_entity(name, entity definition)`
|
||||
* `core.register_abm(abm definition)`
|
||||
* `core.override_abm(name, new_values)`
|
||||
* Change registered ABM
|
||||
* Only on fields mentonied as changeable can be changed.
|
||||
* `core.register_lbm(lbm definition)`
|
||||
* `core.register_alias(alias, original_name)`
|
||||
* Also use this to set the 'mapgen aliases' needed in a game for the core
|
||||
|
@ -9587,6 +9592,10 @@ in active mapblocks.
|
|||
|
||||
```lua
|
||||
{
|
||||
name = "".
|
||||
-- Optional name of ABM.
|
||||
-- ABM with name can be changed at runtime (See `core.override_abm`).
|
||||
|
||||
label = "Lava cooling",
|
||||
-- Descriptive label for profiling purposes (optional).
|
||||
-- Definitions with identical labels will be listed as one.
|
||||
|
@ -9608,14 +9617,18 @@ in active mapblocks.
|
|||
|
||||
interval = 10.0,
|
||||
-- Operation interval in seconds
|
||||
-- This value can be changed by `core.override_abm` call.
|
||||
|
||||
chance = 50,
|
||||
-- Probability of triggering `action` per-node per-interval is 1.0 / chance (integers only)
|
||||
-- This value can be changed by `core.override_abm` call.
|
||||
-- If chance is set to 0, ABM is disabled.
|
||||
|
||||
min_y = -32768,
|
||||
max_y = 32767,
|
||||
-- min and max height levels where ABM will be processed (inclusive)
|
||||
-- can be used to reduce CPU usage
|
||||
-- This value can be changed by `core.override_abm` call.
|
||||
|
||||
catch_up = true,
|
||||
-- If true, catch-up behavior is enabled: The `chance` value is
|
||||
|
@ -9631,6 +9644,7 @@ in active mapblocks.
|
|||
-- mapblock plus all 26 neighboring mapblocks. If any neighboring
|
||||
-- mapblocks are unloaded an estimate is calculated for them based on
|
||||
-- loaded mapblocks.
|
||||
-- This function can be changed by `core.override_abm` call.
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue