-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathcomm.lua
72 lines (61 loc) · 2.2 KB
/
comm.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
local openFormation = true
function specialEvent(params)
print_message_to_user("specialEvent: " ..tostring(params))
return staticParamsEvent(Message.wMsgLeaderSpecialCommand, params)
end
local menus = data.menus
data.rootItem = {
name = _('Main'),
getSubmenu = function(self)
local tbl = {
name = _('Main'),
items = {}
}
if data.pUnit == nil or data.pUnit:isExist() == false then
return tbl
end
if self.builders ~= nil then
for index, builder in pairs(self.builders) do
builder(self, tbl)
end
end
if #data.menuOther.submenu.items > 0 then
tbl.items[10] = {
name = _('Other'),
submenu = data.menuOther.submenu
}
end
return tbl
end,
builders = {}
}
local parameters = {
fighter = true,
radar = true,
ECM = true,
refueling = true
}
utils.verifyChunk(utils.loadfileIn('Scripts/UI/RadioCommandDialogPanel/Config/LockOnAirplane.lua', getfenv()))(parameters)
utils.verifyChunk(utils.loadfileIn('Scripts/UI/RadioCommandDialogPanel/Config/Common/JTAC.lua', getfenv()))(4)
utils.verifyChunk(utils.loadfileIn('Scripts/UI/RadioCommandDialogPanel/Config/Common/ATC.lua', getfenv()))(5, {[Airbase.Category.AIRDROME] = true})
utils.verifyChunk(utils.loadfileIn('Scripts/UI/RadioCommandDialogPanel/Config/Common/Tanker.lua', getfenv()))(6)
utils.verifyChunk(utils.loadfileIn('Scripts/UI/RadioCommandDialogPanel/Config/Common/AWACS.lua', getfenv()))(7, {tanker = true, radar = true})
utils.verifyChunk(utils.loadfileIn('Scripts/UI/RadioCommandDialogPanel/Config/Common/Ground Crew.lua', getfenv()))(8)
-- Wheel Chocks
--[[menus['Wheel chocks'] = {
name = _('Wheel chocks'),
items = {
[1] = {
name = _('Place_'),
command = sendMessage.new(Message.wMsgLeaderGroundToggleWheelChocks, true)
},
[2] = {
name = _('Remove_'),
command = sendMessage.new(Message.wMsgLeaderGroundToggleWheelChocks, false)
}
}
}
menus['Ground Crew'].items[4] = { name = _('Wheel chocks'), submenu = menus['Wheel chocks']}
menus['Ground Crew'].items[5] = { name = _('Salute!'), command = sendMessage.new(Message.wMsgLeaderGroundGestureSalut, true)}
menus['Ground Crew'].items[6] = { name = _('Request Launch'), command = sendMessage.new(Message.wMsgLeaderGroundRequestLaunch, true)}
--]]