mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-26 18:21:04 +00:00
Player attrs: permits to remove an attribute by setting value to nil (#5716)
* Player attrs: permits to remove an attribute by setting value to nil When doing player:set_attribute("attr", nil) remove attribute Also remove a useless check on C++ API part (already done by checkplayer) Fix #5709
This commit is contained in:
parent
0d7c37943b
commit
c1b3ed4180
4 changed files with 29 additions and 14 deletions
|
@ -3028,7 +3028,9 @@ This is basically a reference to a C++ `ServerActiveObject`
|
|||
* `0`: player is drowning,
|
||||
* `1`-`10`: remaining number of bubbles
|
||||
* `11`: bubbles bar is not shown
|
||||
* `set_attribute(attribute, value)`: sets an extra attribute with value on player
|
||||
* `set_attribute(attribute, value)`:
|
||||
* Sets an extra attribute with value on player.
|
||||
* If value is nil, remove attribute from player.
|
||||
* `get_attribute(attribute)`: returns value for extra attribute. Returns nil if no attribute found.
|
||||
* `set_inventory_formspec(formspec)`
|
||||
* Redefine player's inventory form
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue