Add new flags to minetest.features for 5.8.0 features (#13978)

This commit is contained in:
DS 2023-11-12 20:08:57 +01:00 committed by GitHub
parent 7cb20dd6c2
commit 8cf76e004f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

@ -27,6 +27,8 @@ core.features = {
get_light_data_buffer = true, get_light_data_buffer = true,
mod_storage_on_disk = true, mod_storage_on_disk = true,
compress_zstd = true, compress_zstd = true,
sound_params_start_time = true,
physics_overrides_v2 = true,
} }
function core.has_feature(arg) function core.has_feature(arg)

@ -1091,6 +1091,7 @@ Table used to specify how a sound is played:
-- its end in `-start_time` seconds. -- its end in `-start_time` seconds.
-- It is unspecified what happens if `loop` is false and `start_time` is -- It is unspecified what happens if `loop` is false and `start_time` is
-- smaller than minus the sound's length. -- smaller than minus the sound's length.
-- Available since feature `sound_params_start_time`.
loop = false, loop = false,
-- If true, sound is played in a loop. -- If true, sound is played in a loop.
@ -5271,6 +5272,12 @@ Utilities
mod_storage_on_disk = true, mod_storage_on_disk = true,
-- "zstd" method for compress/decompress (5.7.0) -- "zstd" method for compress/decompress (5.7.0)
compress_zstd = true, compress_zstd = true,
-- Sound parameter tables support start_time (5.8.0)
sound_params_start_time = true,
-- New fields for set_physics_override: speed_climb, speed_crouch,
-- liquid_fluidity, liquid_fluidity_smooth, liquid_sink,
-- acceleration_default, acceleration_air (5.8.0)
physics_overrides_v2 = true,
} }
``` ```
@ -7753,6 +7760,8 @@ child will follow movement and rotation of that bone.
settings (e.g. via the game's `minetest.conf`) to set a global base value settings (e.g. via the game's `minetest.conf`) to set a global base value
for all players and only use `set_physics_override` when you need to change for all players and only use `set_physics_override` when you need to change
from the base value on a per-player basis from the base value on a per-player basis
* Note: Some of the fields don't exist in old API versions, see feature
`physics_overrides_v2`.
* `get_physics_override()`: returns the table given to `set_physics_override` * `get_physics_override()`: returns the table given to `set_physics_override`
* `hud_add(hud definition)`: add a HUD element described by HUD def, returns ID * `hud_add(hud definition)`: add a HUD element described by HUD def, returns ID