Time, patience, mood.
For any projects I do, I really have to be in a programming mood.
For various reasons I don't wish to share, I just haven't been in the mood to update/remake Umotd.
As for actual technical challenge of reading the addons..No, it's not that difficult.
I'd already made unreleased Umotd code (before the Garry Gmod HTML update/our ULX release that outdated Umotd) that would read the addon name and author.
It was part of my Umotd Todo list.
--ToDo: Get Addon list
function Umotd_GetAddons(Ufmt,Usep) -- fmt = long = Mod Name(version) description, short = Mod Name(version). sep = what to use as seperator.
local U_aloc = "../addons/"
local U_AddonDirs = file.FindDir(U_aloc .. "*")
local UAddRslt = false
for Uaid, Udir in pairs(U_AddonDirs) do
if file.Exists(U_aloc..Udir.."/info.txt") then
local UAddInfo = util.KeyValuesToTable(file.Read(U_aloc..Udir.."/info.txt"))
if not UAddRslt then
UAddRslt = UAddInfo["name"] .. "("..UAddInfo["version"]..")"
else
UAddRslt = UAddRslt..Usep..UAddInfo["name"] .. "("..UAddInfo["version"]..")"
end
if Ufmt == "long" then UAddRslt = UAddRslt .. " by [" ..UAddInfo["author_name"].."]"
end
end
end
return UAddRslt
end
local UAddons_long = Umotd_GetAddons("long",Umotd_AddOnSep1)
local UAddons_short = Umotd_GetAddons("short",Umotd_AddOnSep2)
The above code example is raw, and can't be used without modification to adjust.
It has no error checking either. Feel free to use it in your own code. Try to give me a little credit if you do.