mirror of
https://github.com/minetest-mods/technic.git
synced 2025-02-23 07:10:19 +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({
|
minetest.register_craft({
|
||||||
output = 'technic:copper_locked_chest 1',
|
output = 'technic:copper_locked_chest 1',
|
||||||
|
type = "shapeless",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'basic_materials:padlock'},
|
{'basic_materials:padlock'},
|
||||||
{'technic:copper_chest'},
|
{'technic:copper_chest'},
|
||||||
|
@ -29,6 +29,7 @@ end
|
|||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:gold_locked_chest',
|
output = 'technic:gold_locked_chest',
|
||||||
|
type = "shapeless",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'basic_materials:padlock'},
|
{'basic_materials:padlock'},
|
||||||
{'technic:gold_chest'},
|
{'technic:gold_chest'},
|
||||||
|
@ -25,6 +25,7 @@ minetest.register_craft({
|
|||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:iron_locked_chest 1',
|
output = 'technic:iron_locked_chest 1',
|
||||||
|
type = "shapeless",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'basic_materials:padlock'},
|
{'basic_materials:padlock'},
|
||||||
{'technic:iron_chest'},
|
{'technic:iron_chest'},
|
||||||
|
@ -20,6 +20,7 @@ end
|
|||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:mithril_locked_chest 1',
|
output = 'technic:mithril_locked_chest 1',
|
||||||
|
type = "shapeless",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'basic_materials:padlock'},
|
{'basic_materials:padlock'},
|
||||||
{'technic:mithril_chest'},
|
{'technic:mithril_chest'},
|
||||||
|
@ -171,6 +171,16 @@ local function get_receive_fields(name, data, locked)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local page = "main"
|
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
|
if fields.sort or (data.autosort and fields.quit and meta:get_int("autosort") == 1) then
|
||||||
sort_inventory(meta:get_inventory())
|
sort_inventory(meta:get_inventory())
|
||||||
end
|
end
|
||||||
|
@ -20,6 +20,7 @@ end
|
|||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:silver_locked_chest',
|
output = 'technic:silver_locked_chest',
|
||||||
|
type = "shapeless",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'basic_materials:padlock'},
|
{'basic_materials:padlock'},
|
||||||
{'technic:silver_chest'},
|
{'technic:silver_chest'},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user