New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new flags to minetest.features for 5.8.0 features #13978
Add new flags to minetest.features for 5.8.0 features #13978
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
While you're at it, can you please also add one entry for the new physics override in |
You're referring to #11465, right? There are multiple new fields, do you have a suggestion for the flag name? |
Idk, maybe |
Done. |
Since the sound parameter table's Examplediff --git a/doc/lua_api.md b/doc/lua_api.md
index 85a6cc559..663c47d90 100644
--- a/doc/lua_api.md
+++ b/doc/lua_api.md
@@ -7730,25 +7730,31 @@ child will follow movement and rotation of that bone.
* `gravity`: multiplier to default gravity value (default: `1`)
* `speed_climb`: multiplier to default climb speed value (default: `1`)
* Note: The actual climb speed is the product of `speed` and `speed_climb`
+ * Available since feature `new_physics_overrides`.
* `speed_crouch`: multiplier to default sneak speed value (default: `1`)
* Note: The actual sneak speed is the product of `speed` and `speed_crouch`
+ * Available since feature `new_physics_overrides`.
* `liquid_fluidity`: multiplier to liquid movement resistance value
(for nodes with `liquid_move_physics`); the higher this value, the lower the
resistance to movement. At `math.huge`, the resistance is zero and you can
move through any liquid like air. (default: `1`)
* Warning: Values below 1 are currently unsupported.
+ * Available since feature `new_physics_overrides`.
* `liquid_fluidity_smooth`: multiplier to default maximum liquid resistance value
(for nodes with `liquid_move_physics`); controls deceleration when entering
node at high speed. At higher values you come to a halt more quickly
(default: `1`)
* `liquid_sink`: multiplier to default liquid sinking speed value;
(for nodes with `liquid_move_physics`) (default: `1`)
+ * Available since feature `new_physics_overrides`.
* `acceleration_default`: multiplier to horizontal and vertical acceleration
on ground or when climbing (default: `1`)
* Note: The actual acceleration is the product of `speed` and `acceleration_default`
+ * Available since feature `new_physics_overrides`.
* `acceleration_air`: multiplier to acceleration
when jumping or falling (default: `1`)
* Note: The actual acceleration is the product of `speed` and `acceleration_air`
+ * Available since feature `new_physics_overrides`.
* `sneak`: whether player can sneak (default: `true`)
* `sneak_glitch`: whether player can use the new move code replications
of the old sneak side-effects: sneak ladders and 2 node sneak jump The only other feature that has this kind of comment is |
@srifqi that definitely helps. The other day it took me 30 minutes to understand why However, we can apply this logic to every new function and argument, and the docs would become a mess in no time |
Other ways to document these are
|
I wasn't sure if I should add such a note for We usually don't add such notes, afaik. I've just added it to
AFAIK, the feature flags are not to intended to communicate such differences in the API. They are rather to make it possible for mods to check in code whether they are using the one or the other API version. (Only required in cases where the new API doesn't quack differently than the old API. 🦆) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR looks good to me.
#12764 added the
start_time
sound param. The server needs to read this param and send it to the clients. Mods need this feature flag to check if the server supports this.(Client support can only be checked via protocol version. AFAIK, it's like this for every feature, so this is fine.)
To do
This PR is a Ready for Review.
How to test
Read.