mirror of
https://github.com/technix/ham_radio.git
synced 2025-03-13 11:22:32 +01:00
separate config
This commit is contained in:
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 = {},
|
||||
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")
|
||||
|
Reference in New Issue
Block a user