diff options
Diffstat (limited to 'currency')
-rw-r--r-- | currency/crafting.lua | 2 | ||||
-rw-r--r-- | currency/safe.lua | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/currency/crafting.lua b/currency/crafting.lua index 33a9553..d80b74c 100644 --- a/currency/crafting.lua +++ b/currency/crafting.lua @@ -2,7 +2,7 @@ minetest.register_craft({ output = 'currency:safe',
recipe = {
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
- {'default:steel_ingot', '', 'default:steel_ingot'},
+ {'default:steel_ingot', 'default:mese_crystal', 'default:steel_ingot'},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
}
})
diff --git a/currency/safe.lua b/currency/safe.lua index 428711f..794e23a 100644 --- a/currency/safe.lua +++ b/currency/safe.lua @@ -8,7 +8,14 @@ function default.get_safe_formspec(pos) end
local function has_safe_privilege(meta, player)
- if not player or player:get_player_name() ~= meta:get_string("owner") then
+ local name = ""
+ if player then
+ if minetest.check_player_privs(player, "protection_bypass") then
+ return true
+ end
+ name = player:get_player_name()
+ end
+ if name ~= meta:get_string("owner") then
return false
end
return true
|