separate config

This commit is contained in:
techniX 2019-12-08 17:17:28 +02:00
parent 2efe6fa8bc
commit fb0a1d7fea
2 changed files with 28 additions and 22 deletions

26
config.lua Normal file

@ -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",
}

@ -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")