1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-06-29 23:00:49 +02:00

add ownership/protection handling for device configuration

take any available ownership into account before deciding on area protection
This commit is contained in:
Tim
2015-03-05 11:14:30 +01:00
parent 86ee58b17c
commit d167aacf4d
7 changed files with 45 additions and 17 deletions

View File

@ -154,8 +154,9 @@ pipeworks.register_tube("pipeworks:teleport_tube", {
meta:set_string("infotext", "unconfigured Teleportation Tube")
end,
on_receive_fields = function(pos,formname,fields,sender)
if not fields.channel then
return -- ignore escaping or clientside manipulation of the form
if not fields.channel -- ignore escaping or clientside manipulation of the form
or not pipeworks.may_configure(pos, sender) then
return
end
local new_channel = tostring(fields.channel):trim()