mirror of
https://github.com/technix/ham_radio.git
synced 2025-01-22 12:01:27 +01:00
fix data reading
This commit is contained in:
parent
a583093ddc
commit
1441b6fe35
5
init.lua
5
init.lua
@ -15,8 +15,9 @@ function ham_radio.find_transmitters(frequency)
|
||||
local transmitter_list = {}
|
||||
local all_transmitters = mod_storage:to_table().fields
|
||||
for key, transmitter_data in pairs(all_transmitters) do
|
||||
if transmitter_data.frequency == frequency then
|
||||
transmitter_list[key] = transmitter_data
|
||||
local transmitter = minetest.parse_json(transmitter_data)
|
||||
if transmitter.frequency == frequency then
|
||||
transmitter_list[key] = transmitter
|
||||
end
|
||||
end
|
||||
return transmitter_list
|
||||
|
Loading…
Reference in New Issue
Block a user