mirror of
https://github.com/technix/ham_radio.git
synced 2025-01-24 04:51:25 +01:00
avoid validation errors when esc pressed
This commit is contained in:
parent
18912d724d
commit
72cad354a6
@ -37,6 +37,10 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
if formname ~= "ham_radio:configure_handheld_receiver" or not minetest.is_player(player) then
|
if formname ~= "ham_radio:configure_handheld_receiver" or not minetest.is_player(player) then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
if fields.frequency == nil then
|
||||||
|
-- form is not sent
|
||||||
|
return
|
||||||
|
end
|
||||||
local is_frequency_valid = ham_radio.validate_frequency(fields.frequency, true)
|
local is_frequency_valid = ham_radio.validate_frequency(fields.frequency, true)
|
||||||
if is_frequency_valid.result == false then
|
if is_frequency_valid.result == false then
|
||||||
ham_radio.errormsg(player, is_frequency_valid.message)
|
ham_radio.errormsg(player, is_frequency_valid.message)
|
||||||
|
Loading…
Reference in New Issue
Block a user