diff --git a/config.lua b/config.lua new file mode 100644 index 0000000..eaa50ae --- /dev/null +++ b/config.lua @@ -0,0 +1,26 @@ +ham_radio.settings = { + -- color of broadcast messages + broadcast_color = '#607d8b', + -- interval between broadcasts (seconds) + broadcast_interval = 10, + -- receiver hud position + hud_pos = { x = 0.5, y = 0.8 }, + -- radio frequency range + frequency = { + min = 0, + max = 9999999 + }, + -- range where only one transmitter is permitted + locked_frequency = { + min = 100000, + max = 9999999 + }, + -- sub-range of locked frequency range + beacon_frequency = { + min = 1000000, + max = 9999999 + }, + -- digiline config + digiline_channel = "ham_radio", + digiline_broadcast_channel = "ham_radio_broadcast", +} diff --git a/init.lua b/init.lua index c413438..9b5ad65 100644 --- a/init.lua +++ b/init.lua @@ -8,28 +8,6 @@ ham_radio = { player_broadcasts = {}, is_receiver_wielded = {}, transmitters = {}, - settings = { - broadcast_color = '#607d8b', - broadcast_interval = 10, -- seconds - hud_pos = { x = 0.5, y = 0.8 }, - -- radio frequency range - frequency = { - min = 0, - max = 9999999 - }, - -- range where only one transmitter is permitted - locked_frequency = { - min = 100000, - max = 9999999 - }, - -- sub-range of frequency range - beacon_frequency = { - min = 1000000, - max = 9999999 - }, - digiline_channel = "ham_radio", - digiline_broadcast_channel = "ham_radio_broadcast", - } } -- preload transmitter data @@ -55,6 +33,8 @@ function ham_radio.delete_transmitter(pos) mod_storage:set_string(key, '') -- storage end +dofile(modpath.."/config.lua") + dofile(modpath.."/helpers.lua") dofile(modpath.."/craft.lua") dofile(modpath.."/digiline.lua")