Rename Minetest to Luanti

This commit is contained in:
Wuzzy 2024-10-29 13:27:31 +01:00
parent 1040f5dcab
commit cf7a0b71aa

View File

@ -6,7 +6,7 @@ This mod makes it possible for multiple mods to modify player physics (speed, ju
## Introduction ## Introduction
### For players ### For players
Mods and games in Minetest can set physical attributes of players, such as speed and jump strength. For example, player speed could be set to 200%. But the way this works makes it difficult for multiple mods to *modify* physical attributes without leading to conflicts, problems and hilarious bugs, like speed that changes often to nonsense values. Mods and games in Luanti can set physical attributes of players, such as speed and jump strength. For example, player speed could be set to 200%. But the way this works makes it difficult for multiple mods to *modify* physical attributes without leading to conflicts, problems and hilarious bugs, like speed that changes often to nonsense values.
The Player Physics API aims to resolve this conflict by providing a “common ground” for mods to work together in this regard. The Player Physics API aims to resolve this conflict by providing a “common ground” for mods to work together in this regard.
@ -19,7 +19,7 @@ Of course, not all mods need the Player Physics API. Mods that don't touch playe
The rest of this document is directed at developers. The rest of this document is directed at developers.
### For developers ### For developers
The function `set_physics_override` from the Minetest Lua API allows mod authors to override physical attributes of players, such as speed or jump strength. The function `set_physics_override` from the Luanti Lua API allows mod authors to override physical attributes of players, such as speed or jump strength.
This function works fine as long there is only one mod that sets a particular physical attribute at a time. However, as soon as at least two different mods (that do not know each other) try to change the same player physics attribute using only this function, there will be conflicts as each mod will undo the change of the other mod, as the function sets a raw value. A classic race condition occurs. This is the case because the mods fail to communicate with each other. This function works fine as long there is only one mod that sets a particular physical attribute at a time. However, as soon as at least two different mods (that do not know each other) try to change the same player physics attribute using only this function, there will be conflicts as each mod will undo the change of the other mod, as the function sets a raw value. A classic race condition occurs. This is the case because the mods fail to communicate with each other.