1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Customizeable max breath for players (#6411)

* Customizeable maximal breath for players
This commit is contained in:
SmallJoker 2017-09-15 12:18:47 +02:00 committed by Loïc Blot
parent 7640749d68
commit edbc533414
11 changed files with 57 additions and 47 deletions

View file

@ -3397,10 +3397,9 @@ This is basically a reference to a C++ `ServerActiveObject`
* `get_breath()`: returns players breath
* `set_breath(value)`: sets players breath
* values:
* `0`: player is drowning,
* `1`-`10`: remaining number of bubbles
* `11`: bubbles bar is not shown
* See constant: `minetest.PLAYER_MAX_BREATH`
* `0`: player is drowning
* max: bubbles bar is not shown
* See Object Properties for more information
* `set_attribute(attribute, value)`:
* Sets an extra attribute with value on player.
* `value` must be a string.
@ -4105,7 +4104,9 @@ Definition tables
{
hp_max = 1,
-- ^ For players, the maximal HP defaults to `minetest.PLAYER_MAX_HP_DEFAULT`
-- ^ For players: Defaults to `minetest.PLAYER_MAX_HP_DEFAULT`
breath_max = 0,
-- ^ For players only. Defaults to `minetest.PLAYER_MAX_BREATH_DEFAULT`
physical = true,
collide_with_objects = true, -- collide with other objects if physical = true
weight = 5,