mirror of
https://github.com/minetest-mods/technic.git
synced 2025-02-22 23:00:22 +01:00
Merge pull request #34 from minetest-mods/master
[pull] master from minetest-mods:master
This commit is contained in:
commit
a034b7a518
@ -18,6 +18,7 @@ minetest.register_craft({
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'technic:copper_locked_chest 1',
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
{'basic_materials:padlock'},
|
||||
{'technic:copper_chest'},
|
||||
|
@ -29,6 +29,7 @@ end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'technic:gold_locked_chest',
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
{'basic_materials:padlock'},
|
||||
{'technic:gold_chest'},
|
||||
|
@ -25,6 +25,7 @@ minetest.register_craft({
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'technic:iron_locked_chest 1',
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
{'basic_materials:padlock'},
|
||||
{'technic:iron_chest'},
|
||||
|
@ -20,6 +20,7 @@ end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'technic:mithril_locked_chest 1',
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
{'basic_materials:padlock'},
|
||||
{'technic:mithril_chest'},
|
||||
|
@ -171,6 +171,16 @@ local function get_receive_fields(name, data, locked)
|
||||
end
|
||||
|
||||
local page = "main"
|
||||
|
||||
local owner = meta:get_string("owner")
|
||||
if owner ~= "" then
|
||||
-- prevent modification of locked chests
|
||||
if owner ~= sender:get_player_name() then return end
|
||||
elseif not fields.quit then
|
||||
-- prevent modification of protected chests
|
||||
if minetest.is_protected(pos, sender:get_player_name()) then return end
|
||||
end
|
||||
|
||||
if fields.sort or (data.autosort and fields.quit and meta:get_int("autosort") == 1) then
|
||||
sort_inventory(meta:get_inventory())
|
||||
end
|
||||
|
@ -20,6 +20,7 @@ end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'technic:silver_locked_chest',
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
{'basic_materials:padlock'},
|
||||
{'technic:silver_chest'},
|
||||
|
Loading…
x
Reference in New Issue
Block a user