minetest_docs
minetest_docs copied to clipboard
`set_player_privs` footguns
Both of these warrant a DANGER admonition:
- Attempting to use
set_player_privsincrementally by doing justminetest.set_player_privs(name, {my_priv = true})and expecting it to grantmy_priv(whereas in reality it revokes all privs except formy_priv) - Attempting to use
set_player_privsas if a booleanfalsevalue was treated as revoking a priv (whereas the privs are a set and thus this is treated as granting the priv):privs.my_priv = false; minetest.set_player_privs(name, privs)
@rollerozxa is being assigned for heretic variable naming inherited from a poorly written Sudoku game.