Protection support on digicontrol and controlrail
This commit is contained in:
parent
ebdbf22191
commit
cc49249155
@ -44,6 +44,7 @@ minetest.register_node("railcarts:controlrail", {
|
||||
meta:set_string("infotext", "speedup")
|
||||
end,
|
||||
on_receive_fields = function(pos, formname, fields, sender)
|
||||
if minetest.is_protected(pos, sender:get_player_name()) then return end
|
||||
if fields and fields.fn then
|
||||
dbg.v2("Control rail at "..minetest.pos_to_string(pos).." set to "..fields.fn.." by "..(sender:get_player_name() or ""))
|
||||
local meta = minetest.get_meta(pos)
|
||||
|
@ -31,6 +31,8 @@ minetest.register_node("railcarts:digicontrol", {
|
||||
meta:set_string("infotext", "none")
|
||||
end,
|
||||
on_receive_fields = function(pos, formname, fields, sender)
|
||||
if minetest.is_protected(pos, sender:get_player_name()) then return end
|
||||
if not fields.channel then return end
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("channel", fields.channel)
|
||||
end,
|
||||
|
Loading…
x
Reference in New Issue
Block a user