mirror of
https://github.com/technix/ham_radio.git
synced 2024-08-19 20:54:07 +02:00
separate config
This commit is contained in:
parent
2efe6fa8bc
commit
fb0a1d7fea
26
config.lua
Normal file
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",
|
||||||
|
}
|
24
init.lua
24
init.lua
@ -8,28 +8,6 @@ ham_radio = {
|
|||||||
player_broadcasts = {},
|
player_broadcasts = {},
|
||||||
is_receiver_wielded = {},
|
is_receiver_wielded = {},
|
||||||
transmitters = {},
|
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
|
-- preload transmitter data
|
||||||
@ -55,6 +33,8 @@ function ham_radio.delete_transmitter(pos)
|
|||||||
mod_storage:set_string(key, '') -- storage
|
mod_storage:set_string(key, '') -- storage
|
||||||
end
|
end
|
||||||
|
|
||||||
|
dofile(modpath.."/config.lua")
|
||||||
|
|
||||||
dofile(modpath.."/helpers.lua")
|
dofile(modpath.."/helpers.lua")
|
||||||
dofile(modpath.."/craft.lua")
|
dofile(modpath.."/craft.lua")
|
||||||
dofile(modpath.."/digiline.lua")
|
dofile(modpath.."/digiline.lua")
|
||||||
|
Loading…
Reference in New Issue
Block a user