mirror of
https://github.com/mt-mods/pipeworks.git
synced 2025-06-29 14:50:41 +02:00
Skip protection check on formspec close
Prevents protector flip/player being hurt/protection violation if the player closes the formspec without attempting any changes (sorting tube and autocrafter).
This commit is contained in:
@ -276,7 +276,10 @@ minetest.register_node("pipeworks:autocrafter", {
|
||||
update_meta(meta, false)
|
||||
end,
|
||||
on_receive_fields = function(pos, formname, fields, sender)
|
||||
if not pipeworks.may_configure(pos, sender) then return end
|
||||
if (fields.quit and not fields.key_enter_field)
|
||||
or not pipeworks.may_configure(pos, sender) then
|
||||
return
|
||||
end
|
||||
local meta = minetest.get_meta(pos)
|
||||
if fields.on then
|
||||
update_meta(meta, false)
|
||||
|
Reference in New Issue
Block a user