From 17e68bb168c16e3db803af3eb2b289c8fe0564bb Mon Sep 17 00:00:00 2001 From: Lejo Date: Tue, 11 Dec 2018 16:27:08 +0100 Subject: [PATCH] Check protection of the quarry --- technic/machines/HV/quarry.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index 0a45559..aa84f41 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -60,6 +60,12 @@ local function set_quarry_demand(meta) end local function quarry_receive_fields(pos, formname, fields, sender) + local player_name = sender:get_player_name() + if minetest.is_protected(pos, player_name) then + minetest.chat_send_player(player_name, "You are not allowed to edit this!") + minetest.record_protection_violation(pos, player_name) + return + end local meta = minetest.get_meta(pos) if fields.size and string.find(fields.size, "^[0-9]+$") then local size = tonumber(fields.size)