From 8cf76e004fe9bda21762437cbbcbd8750378e7f1 Mon Sep 17 00:00:00 2001 From: DS Date: Sun, 12 Nov 2023 20:08:57 +0100 Subject: [PATCH] Add new flags to minetest.features for 5.8.0 features (#13978) --- builtin/game/features.lua | 2 ++ doc/lua_api.md | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/builtin/game/features.lua b/builtin/game/features.lua index 334d62acc..c76566ed3 100644 --- a/builtin/game/features.lua +++ b/builtin/game/features.lua @@ -27,6 +27,8 @@ core.features = { get_light_data_buffer = true, mod_storage_on_disk = true, compress_zstd = true, + sound_params_start_time = true, + physics_overrides_v2 = true, } function core.has_feature(arg) diff --git a/doc/lua_api.md b/doc/lua_api.md index 3a908dcc4..3ba51809e 100644 --- a/doc/lua_api.md +++ b/doc/lua_api.md @@ -1091,6 +1091,7 @@ Table used to specify how a sound is played: -- its end in `-start_time` seconds. -- It is unspecified what happens if `loop` is false and `start_time` is -- smaller than minus the sound's length. + -- Available since feature `sound_params_start_time`. loop = false, -- If true, sound is played in a loop. @@ -5271,6 +5272,12 @@ Utilities mod_storage_on_disk = true, -- "zstd" method for compress/decompress (5.7.0) 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 for all players and only use `set_physics_override` when you need to change 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` * `hud_add(hud definition)`: add a HUD element described by HUD def, returns ID