Make protection a bit stricter

This commit is contained in:
Aaron Suen 2020-07-17 17:48:32 -04:00
parent a6303b44ed
commit 0c6b026fdf
2 changed files with 3 additions and 2 deletions

View File

@ -13,7 +13,8 @@ This mod was created primarily for the use-case of the official unofficial NodeC
* After a world reset, summoning the platform in the new world will restore its saved contents from the previous world. * After a world reset, summoning the platform in the new world will restore its saved contents from the previous world.
* The recipe for summoning the platform is a cross of Eggcorns (+ orientation, not x) of the same width as the platform, laid out on flat ground; pummel the central Eggcorn with another Eggcorn. * The recipe for summoning the platform is a cross of Eggcorns (+ orientation, not x) of the same width as the platform, laid out on flat ground; pummel the central Eggcorn with another Eggcorn.
* Everything else in the space where the platform is to be summoned must be air (anything else, including water, must be excavated). * Everything else in the space where the platform is to be summoned must be air (anything else, including water, must be excavated).
* Access restrictions on the container's contents are configurable. By default, solid lode cubes, when placed as nodes (not item stacks) and lode crates (and their contents) are protected and only the platform's owner can access them. * Access restrictions on the platform's contents are configurable. By default, solid lode cubes, lode crates and their contents, and totes and packed contents are protected and, only the platform's owner can access them.
* It is possible for players to place thing into someone else's dais (via dropping/throwing) that they then can't pick back up. This is a known issue and not preventable.
* A platform can be banished by the player who owns it by pummeling the core with an eggcorn, but only if it's returned to *exact* "original" condition (empty except for the cobble floor). * A platform can be banished by the player who owns it by pummeling the core with an eggcorn, but only if it's returned to *exact* "original" condition (empty except for the cobble floor).
The default platform size (configurable) is **9x9 at the base, 5 high**. The default platform size (configurable) is **9x9 at the base, 5 high**.

View File

@ -27,7 +27,7 @@ end
local function check(pos, thingname, pname) local function check(pos, thingname, pname)
if minetest.check_player_privs(pname, "protection_bypass") then return end if minetest.check_player_privs(pname, "protection_bypass") then return end
if match(thingname) then if match(thingname) or match(nodecore.stack_get(pos):get_name()) then
local owned = exmachina.owner_search(pos) local owned = exmachina.owner_search(pos)
if owned and owned ~= pname then return true end if owned and owned ~= pname then return true end
end end