forked from Tobias00723/DCS-Scripting-Library-Updated
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmissionCommands.lua
More file actions
93 lines (79 loc) · 5.43 KB
/
missionCommands.lua
File metadata and controls
93 lines (79 loc) · 5.43 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
--[[
updated by Tobias00723
orignial author : unkown ;/
from the TGFB server
Discord : https://discord.gg/hEHd4A3czx
any questions? ^^
find me on the my discord server ^^
feel free to use these DCS prototypes
no mentions or anything needed :)
]]
---@meta
---The missionCommands singleton allows for greater access and flexibility of use for the F10 Other radio menu. Added commands can contain sub-menus and directly call lua functions.
---https://wiki.hoggitworld.com/view/DCS_singleton_missionCommands
missionCommands = {}
do
---Adds a command to the "F10 Other" radio menu allowing players to run specified scripting functions. Command is added for both teams. The string name is the text that will be displayed in the F10 Other menu and is also used in the function to remove the command from the menu. Path is an optional value that defines whether or not the command will be in a named submenu. FunctionToCall is the name of the function, with the optional argument value designating any passed values.
---https://wiki.hoggitworld.com/view/DCS_func_addCommand
---@return table
---@param name string
---@param path table|nil
---@param functionToRun function
---@param anyArguement any|nil
function missionCommands.addCommand(name, path, functionToRun, anyArguement) end
--- Creates a submenu of a specified name for all players. Can be used to create nested sub menues. If the path is not specified, submenu is added to the root menu.
---https://wiki.hoggitworld.com/view/DCS_func_addSubMenu
---@return table
---@param name string
---@param path table|nil
function missionCommands.addSubMenu(name, path) end
---Removes the item of the specified path from the F10 radio menu for all. If the value is nil all items will be removed from the radio menu. If the path given is a submenu then all items nested within will be removed.
---https://wiki.hoggitworld.com/view/DCS_func_removeItem
---@param path table|nil table or nil
function missionCommands.removeItem(path) end
---Adds a command to the "F10 Other" radio menu allowing players to run specified scripting functions. Command is added for the specified coalition. The string name is the text that will be displayed in the F10 Other menu and is also used in the function to remove the command from the menu. Path is an optional value that defines whether or not the command will be in a named submenu. FunctionToCall is the name of the function, with the optional argument value designating any passed values.
---https://wiki.hoggitworld.com/view/DCS_func_addCommandForCoalition
---@return table
---@param coalitionSide side enum
---@param name string
---@param path table|nil table or nil
---@param functionToRun function
---@param anyArguement any|nil
function missionCommands.addCommandForCoalition(coalitionSide, name, path, functionToRun, anyArguement) end
---Creates a submenu of a specified name for the specified coalition. Can be used to create nested sub menues. If the path is not specified, submenu is added to the root menu.
---https://wiki.hoggitworld.com/view/DCS_func_addSubMenuForCoalition
---@return table
---@param coalitionSide side enum
---@param name string
---@param path table|nil
function missionCommands.addSubMenuForCoalition(coalitionSide, name, path) end
---Removes the item of the specified path from the F10 radio menu for the specified coalition. If the value is nil all items will be removed from the radio menu.
---https://wiki.hoggitworld.com/view/DCS_func_removeItemForCoalition
---@return function
---@param coalitionSide side enum
---@param path table|nil table or nil
function missionCommands.removeItemForCoalition(coalitionSide, path) end
---Adds a command to the "F10 Other" radio menu allowing players to run specified scripting functions. Command is added for the specified groupId. The string name is the text that will be displayed in the F10 Other menu and is also used in the function to remove the command from the menu. Path is an optional value that defines whether or not the command will be in a named submenu. FunctionToCall is the name of the function, with the optional argument value designating any passed values.
---https://wiki.hoggitworld.com/view/DCS_func_addCommandForGroup
---@return table
---@param groupId number
---@param name string
---@param path table|nil table or nil
---@param functionToRun function
---@param anyArguement any|nil
function missionCommands.addCommandForGroup(groupId, name, path, functionToRun, anyArguement) end
---Creates a submenu of a specified name for the specified group. Can be used to create nested sub menues. If the path is not specified, submenu is added to the root menu.
---https://wiki.hoggitworld.com/view/DCS_func_addSubMenuForGroup
---@return table
---@param groupId number
---@param name string
---@param path table|nil
function missionCommands.addSubMenuForGroup(groupId, name, path) end
---Removes the item of the specified path from the F10 radio menu for the specified group. If the value is nil all items will be removed from the radio menu.
---https://wiki.hoggitworld.com/view/DCS_func_removeItemForGroup
---@return function
---@param groupId number
---@param path table|nil table or nil
function missionCommands.removeItemForGroup(groupId, path) end
end
return missionCommands