InfoDump: Removed an unneeded function.
This commit is contained in:
parent
f576b71809
commit
44cf86dcf9
@ -73,34 +73,6 @@ end
|
||||
|
||||
|
||||
|
||||
--- Returns an array-table of all commands that are in the specified category
|
||||
-- Each item is a table {Command = "/command string", Info = {<command info in PluginInfo>}}
|
||||
local function GetCategoryCommands(a_PluginInfo, a_CategoryName)
|
||||
local res = {};
|
||||
local function AppendCategoryCommand(a_Prefix, a_Commands)
|
||||
for cmd, info in pairs(a_Commands) do
|
||||
info.Category = info.Category or {};
|
||||
if (type(info.Category) == "string") then
|
||||
info.Category = {info.Category};
|
||||
end
|
||||
for idx, cat in ipairs(info.Category) do
|
||||
if (cat == a_CategoryName) then
|
||||
table.insert(res, {Command = a_Prefix .. cmd, Info = info});
|
||||
end
|
||||
end
|
||||
if (info.Subcommands ~= nil) then
|
||||
AppendCategoryCommand(a_Prefix .. cmd .. " ", info.Subcommands);
|
||||
end
|
||||
end
|
||||
end
|
||||
AppendCategoryCommand("", a_PluginInfo.Commands);
|
||||
return res;
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--- Builds an array of categories, each containing all the commands belonging to the category,
|
||||
-- and the category description, if available.
|
||||
-- Returns the array table, each item has the following format:
|
||||
|
Loading…
Reference in New Issue
Block a user