mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-21 18:11:11 +00:00
Add possibility to easier override HP and breath engine logic by Lua (#14179)
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
This commit is contained in:
parent
dc21924f31
commit
f2c66b9ceb
6 changed files with 66 additions and 4 deletions
|
@ -8495,6 +8495,14 @@ child will follow movement and rotation of that bone.
|
|||
* Result is a table with the same fields as `light_definition` in `set_lighting`.
|
||||
* `respawn()`: Respawns the player using the same mechanism as the death screen,
|
||||
including calling `on_respawnplayer` callbacks.
|
||||
* `get_flags()`: returns a table of player flags (the following boolean fields):
|
||||
* `breathing`: Whether breathing (regaining air) is enabled, default `true`.
|
||||
* `drowning`: Whether drowning (losing air) is enabled, default `true`.
|
||||
* `node_damage`: Whether the player takes damage from nodes, default `true`.
|
||||
* `set_flags(flags)`: sets flags
|
||||
* takes a table in the same format as returned by `get_flags`
|
||||
* absent fields are left unchanged
|
||||
|
||||
|
||||
`PcgRandom`
|
||||
-----------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue