Added extra possible Info.lua parameter that describes the dependencies (#5554)
This commit is contained in:
parent
cc6459bf0e
commit
884e3e97a6
@ -594,6 +594,55 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
local function DumpDependenciesForum(a_PluginInfo, f)
|
||||||
|
if (not a_PluginInfo.Dependencies) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
f:write("\n[size=x-large]Dependencies[/size]\n[list]")
|
||||||
|
for idx, dependency in ipairs(a_PluginInfo.Dependencies) do
|
||||||
|
f:write("\n\n [*] [b]", dependency.Name, "[/b]", dependency.Optional == true and " (Optional)" or " (Required)")
|
||||||
|
if (dependency.Description) then
|
||||||
|
f:write("\nDescription: ", ForumizeString(dependency.Description))
|
||||||
|
end
|
||||||
|
if (dependency.Type) then
|
||||||
|
f:write("\nType: ", dependency.Type)
|
||||||
|
end
|
||||||
|
if (dependency.Url) then
|
||||||
|
f:write("\nUrl: ", dependency.Url)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
f:write("\n[/list]")
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
local function DumpDependenciesGithub(a_PluginInfo, f)
|
||||||
|
if (not a_PluginInfo.Dependencies) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
f:write("\n# Dependencies\n")
|
||||||
|
for idx, dependency in ipairs(a_PluginInfo.Dependencies) do
|
||||||
|
f:write("\n\n * **", dependency.Name, "** ", dependency.Optional == true and "(Optional)" or "(Required)")
|
||||||
|
if (dependency.Description) then
|
||||||
|
f:write("<br />\nDescription: ", GithubizeString(dependency.Description))
|
||||||
|
end
|
||||||
|
if (dependency.Type) then
|
||||||
|
f:write("<br />\nType: ", dependency.Type)
|
||||||
|
end
|
||||||
|
if (dependency.Url) then
|
||||||
|
f:write("<br />\nUrl: [", dependency.Url, "](", dependency.Url , ")")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- Dumps the forum-format info for the plugin
|
--- Dumps the forum-format info for the plugin
|
||||||
-- Returns true on success, nil and error message on failure
|
-- Returns true on success, nil and error message on failure
|
||||||
local function DumpPluginInfoForum(a_PluginFolder, a_PluginInfo)
|
local function DumpPluginInfoForum(a_PluginFolder, a_PluginInfo)
|
||||||
@ -608,6 +657,7 @@ local function DumpPluginInfoForum(a_PluginFolder, a_PluginInfo)
|
|||||||
DumpAdditionalInfoForum(a_PluginInfo, f)
|
DumpAdditionalInfoForum(a_PluginInfo, f)
|
||||||
DumpCommandsForum(a_PluginInfo, f)
|
DumpCommandsForum(a_PluginInfo, f)
|
||||||
DumpPermissionsForum(a_PluginInfo, f)
|
DumpPermissionsForum(a_PluginInfo, f)
|
||||||
|
DumpDependenciesForum(a_PluginInfo, f)
|
||||||
if (a_PluginInfo.SourceLocation ~= nil) then
|
if (a_PluginInfo.SourceLocation ~= nil) then
|
||||||
f:write("\n[b]Source[/b]: ", a_PluginInfo.SourceLocation, "\n")
|
f:write("\n[b]Source[/b]: ", a_PluginInfo.SourceLocation, "\n")
|
||||||
end
|
end
|
||||||
@ -641,6 +691,7 @@ local function DumpPluginInfoGithub(a_PluginFolder, a_PluginInfo)
|
|||||||
DumpAdditionalInfoGithub(a_PluginInfo, f)
|
DumpAdditionalInfoGithub(a_PluginInfo, f)
|
||||||
DumpCommandsGithub(a_PluginInfo, f)
|
DumpCommandsGithub(a_PluginInfo, f)
|
||||||
DumpPermissionsGithub(a_PluginInfo, f)
|
DumpPermissionsGithub(a_PluginInfo, f)
|
||||||
|
DumpDependenciesGithub(a_PluginInfo, f)
|
||||||
|
|
||||||
f:close()
|
f:close()
|
||||||
return true
|
return true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user