1
0
Fork 0
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:
sfence 2024-08-21 20:24:43 +02:00 committed by GitHub
parent dc21924f31
commit f2c66b9ceb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 66 additions and 4 deletions

View file

@ -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`
-----------