forked from TeamUlysses/ulx
More fixes for reading data from addon information (Thanks, @Xylios).
This fixes #55.
This commit is contained in:
parent
abb3e87a72
commit
2cd8904dc6
@ -1,5 +1,8 @@
|
||||
# ULX Changelog
|
||||
|
||||
## v3.72 - *(00/00/00)*
|
||||
* [FIX] More fixes for reading data from addon information (Thanks, Xylios).
|
||||
|
||||
## v3.71 - *(05/22/16)*
|
||||
* [FIX] Reading information from corrupted addons (Thanks, Jindego).
|
||||
* [FIX] XGUI showing all commands if the UCL contained an empty string (Thanks, Steven).
|
||||
|
@ -102,8 +102,9 @@ if ULib.fileExists( "lua/ulx/modules/cl/motdmenu.lua" ) or ulx.motdmenu_exists t
|
||||
for _, addon in ipairs( possibleaddons ) do
|
||||
if ULib.fileExists( "addons/" .. addon .. "/addon.txt" ) then
|
||||
local t = ULib.parseKeyValues( ULib.stripComments( ULib.fileRead( "addons/" .. addon .. "/addon.txt" ), "//" ) )
|
||||
if t then
|
||||
table.insert( ulx.motdSettings.addons, { title=addon, author=t.author_name } )
|
||||
if t and t.AddonInfo then
|
||||
local name = t.AddonInfo.name or addon
|
||||
table.insert( ulx.motdSettings.addons, { title=name, author=t.AddonInfo.author_name } )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -323,7 +323,8 @@ function ulx.debuginfo( calling_ply )
|
||||
local author, version, date
|
||||
if ULib.fileExists( "addons/" .. addon .. "/addon.txt" ) then
|
||||
local t = ULib.parseKeyValues( ULib.stripComments( ULib.fileRead( "addons/" .. addon .. "/addon.txt" ), "//" ) )
|
||||
if t then
|
||||
if t and t.AddonInfo then
|
||||
t = t.AddonInfo
|
||||
if t.name then name = t.name end
|
||||
if t.version then version = t.version end
|
||||
if tonumber( version ) then version = string.format( "%g", version ) end -- Removes innaccuracy in floating point numbers
|
||||
|
Loading…
Reference in New Issue
Block a user