mirror of
https://github.com/Sokomine/travelnet.git
synced 2024-08-20 13:34:20 +02:00
buttons for locked travelnet work now
This commit is contained in:
parent
cc1e2eade3
commit
19c0c162b9
8
init.lua
8
init.lua
@ -205,6 +205,9 @@ end
|
|||||||
travelnet.form_input_handler = function( player, formname, fields)
|
travelnet.form_input_handler = function( player, formname, fields)
|
||||||
if(formname == "travelnet:show" and fields and fields.pos2str) then
|
if(formname == "travelnet:show" and fields and fields.pos2str) then
|
||||||
local pos = minetest.string_to_pos( fields.pos2str );
|
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
|
-- back button leads back to the main menu
|
||||||
if( fields.back and fields.back ~= "" ) then
|
if( fields.back and fields.back ~= "" ) then
|
||||||
return travelnet.show_current_formspec( pos,
|
return travelnet.show_current_formspec( pos,
|
||||||
@ -667,6 +670,11 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
|
|||||||
return;
|
return;
|
||||||
end
|
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
|
-- show help text
|
||||||
if( fields and fields.station_help_setup and fields.station_help_setup ~= "") then
|
if( fields and fields.station_help_setup and fields.station_help_setup ~= "") then
|
||||||
-- simulate right-click
|
-- simulate right-click
|
||||||
|
Loading…
Reference in New Issue
Block a user