mirror of
https://github.com/minetest-mods/technic.git
synced 2024-11-13 05:50:41 +01:00
Check protection of the quarry
This commit is contained in:
parent
333eae7a5f
commit
17e68bb168
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user