1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-11-10 11:25:07 -05:00
minetest/builtin
Auke Kok f627ef39e0 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.
2016-03-11 21:09:53 +00:00
..
async Use "core" namespace internally 2014-05-08 13:02:04 -04:00
common Faster insertion into table 2016-03-06 23:42:04 +00:00
fstk Faster insertion into table 2016-03-06 23:42:04 +00:00
game Introduce "protection_bypass" privilege. 2016-03-11 21:09:53 +00:00
mainmenu Settings Tab: Regroup dropdown datas in tables 2016-03-06 23:42:21 +00:00
init.lua builtin: Fix print crashing on nil "holes". 2016-02-08 01:55:02 +01:00
settingtypes.txt Add forgotten valleys mapgen in mapgen name 2016-03-05 16:06:27 +01:00