Skip to content
Snippets Groups Projects
Commit 568917c2 authored by DarkGod's avatar DarkGod
Browse files

Addons list now shows addon version, if it has one

parent 241ffc9a
No related branches found
No related tags found
No related merge requests found
......@@ -383,6 +383,11 @@ function _M:listAddons(mod, ignore_compat)
add.teaac = teaac
add.natural_compatible = engine.version_nearly_same(mod.version, add.version)
add.version_txt = ("%d.%d.%d"):format(add.version[1], add.version[2], add.version[3])
if add.addon_version then
add.addon_version_txt = ("%d.%d.%d"):format(add.addon_version[1], add.addon_version[2], add.addon_version[3])
else
add.addon_version_txt = "--"
end
if add.dlc and not profile:isDonator(add.dlc) then add.dlc = "no" end
if add.id_dlc and not profile:allowDLC(add.id_dlc) then add.id_dlc = "no" end
adds[#adds+1] = add
......
......@@ -60,7 +60,7 @@ function _M:init()
}, list=self.list, fct=function(item) end, select=function(item, sel) self:select(item) end}
self.c_adds = ListColumns.new{width=math.floor(self.iw * 2 / 3 - 10), height=self.ih - 10 - self.c_compat.h, scrollbar=true, columns={
{name="Addon", width=60, display_prop="long_name"},
{name="Addon", width=50, display_prop="long_name"},
{name="Active", width=20, display_prop=function(item)
if item.cheat_only and not config.settings.cheat then
return "#GREY#Developer tool"
......@@ -72,7 +72,8 @@ function _M:init()
return (item.natural_compatible and "#LIGHT_GREEN#Auto: Active" or "#LIGHT_RED#Auto: Incompatible"):toTString()
end
end},
{name="Version", width=20, display_prop="version_txt"},
{name="Addon Version", width=15, display_prop="addon_version_txt"},
{name="Game Version", width=15, display_prop="version_txt"},
}, list={}, fct=function(item) self:switchAddon(item) end, select=function(item, sel) self:select(item) end}
local sep = Separator.new{dir="horizontal", size=self.ih - 10}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment