mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02: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:
@@ -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
|
||||
|
Reference in New Issue
Block a user