mirror of
https://github.com/minetest-mods/technic.git
synced 2024-11-17 15:58:37 +01:00
Check protection of the forcefield
This commit is contained in:
parent
bdd13beeff
commit
333eae7a5f
@ -126,6 +126,12 @@ local function set_forcefield_formspec(meta)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local forcefield_receive_fields = function(pos, formname, fields, sender)
|
local forcefield_receive_fields = function(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)
|
local meta = minetest.get_meta(pos)
|
||||||
local range = nil
|
local range = nil
|
||||||
if fields.range then
|
if fields.range then
|
||||||
|
Loading…
Reference in New Issue
Block a user