buttons for locked travelnet work now

This commit is contained in:
Sokomine 2019-03-10 16:52:45 +01:00
parent cc1e2eade3
commit 19c0c162b9

@ -205,6 +205,9 @@ end
travelnet.form_input_handler = function( player, formname, fields)
if(formname == "travelnet:show" and fields and fields.pos2str) then
local pos = minetest.string_to_pos( fields.pos2str );
if( locks and (fields.locks_config or fields.locks_authorize)) then
return locks:lock_handle_input( pos, formname, fields, player )
end
-- back button leads back to the main menu
if( fields.back and fields.back ~= "" ) then
return travelnet.show_current_formspec( pos,
@ -667,6 +670,11 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
return;
end
-- show special locks buttons if needed
if( locks and (fields.locks_config or fields.locks_authorize)) then
return locks:lock_handle_input( pos, formname, fields, player )
end
-- show help text
if( fields and fields.station_help_setup and fields.station_help_setup ~= "") then
-- simulate right-click