Commit Graph

12 Commits

Author SHA1 Message Date
rubenwardy d5c162fb03
Add luacheck to check builtin (#7895) 2022-05-21 16:17:08 +02:00
Wuzzy 4211230bb6
Make chat command + privilege help slightly more accurate (#6964)
* Make chat command help slightly more accurate

* Slightly more accurate privilege help

* Simplify command/priv help

* More command/priv help tweaks
2022-05-21 16:15:44 +02:00
lhofhansl a42d4efd0d
Do not grant all privs to the admin - changes game behavior (#6460)
* Do not grant all privs to admins.

* Default give_to_admin to give_to_singleplayer
2022-05-21 16:15:25 +02:00
Loïc Blot 766de75bda
Implement minetest.register_can_bypass_userlimit (#6369)
* Implement minetest.register_on_userlimit_check

This new callback permits to bypass the max_users parameter with new mods condition, based on player name or IP
Only one mod needs to permit it.

Move core part for builtin privileges checks to builtin
2022-05-21 16:15:16 +02:00
paramat 63a338876a
Zoom: Move enabling zoom to a new player object property
Default enabled for no change in default behaviour.
Remove 'zoom' privilege.
2022-05-21 16:15:14 +02:00
Wuzzy 8de2093059
Privileges: Only give singleplayer 4 basic privs
- interact
- shout
- privs
- basic_privs
2022-05-21 16:14:00 +02:00
lhofhansl 912d6b1059
Add debug priv, and allow player to display the scene as wire-frame. (#4709) 2022-05-21 16:13:59 +02:00
Ben Deutsch 6d21a3b8fe
Zooming the camera requires the 'zoom' privilege 2022-05-21 16:13:46 +02:00
Sokomine 71b4fd31ac
protection_bypass priv can now be revoked in singleplayer (#4169) 2022-05-21 16:13:40 +02:00
Auke Kok 9e994e0e39
Introduce "protection_bypass" privilege.
This privilege allows map protection bypassing for server operators
and world moderators.

Initially I had thought that bypassing protection mods would have been
something that could entirely be done inside mods and minetest_game,
but the concept of protection is defined in core, in the code of
core.is_protected().

I don't feel that it would be logical to introduce a protection
concept in core, but not some way around that for server operators
to maintain map parts that need fixing, de-griefing or cleanup.

Others had noticed the same problems, and proposed a patch to
minetest_game. That patch is fine by itself, but it fails to add
protection bypass functionality for digging normal nodes and placing
nodes.

So, instead, we indroduce the new priv "protection_bypass" in core,
and modify 'on_place_node' and 'node_dig' to allow bypassing node
protections if the player holds this priv.

This priv was tested with protector redo by tenplus1.

A followup patch to Minetest Game will include allowing special checks
for doors, trapdoors, chests in Minetest Game.

Protection mods will likely want to mimic the changes in their relevant
code sections.
2022-05-21 16:13:25 +02:00
ShadowNinja 37c32c715f
Use "core" namespace internally 2022-05-21 16:11:41 +02:00
ShadowNinja 148b74312e
Organize builtin into subdirectories 2022-05-21 16:11:40 +02:00