Skip to content
Snippets Groups Projects
Commit 6888f487 authored by dg's avatar dg
Browse files

Addons show up in the online charsheets

git-svn-id: http://svn.net-core.org/repos/t-engine4@4699 51575b47-30f0-44d4-a5cc-537603b46e54
parent 57ac3b87
No related branches found
No related tags found
No related merge requests found
......@@ -43,8 +43,16 @@ function _M:dumpToJSON(js)
end
deaths = deaths.."</ul>"
end
local addons = {}
for name, add in pairs(game.__mod_info.addons) do
addons[#addons+1] = (" - %s %d.%d.%d"):format(add.long_name, add.version[1], add.version[2], add.version[3])
end
if #addons > 0 then addons = "<br/>"..table.concat(addons, "<br/>")
else addons = "" end
js:newSection("character", "char", "pairs", "add", {
{ game = string.format("%s (version %d.%d.%d)", game.__mod_info.long_name, game.__mod_info.version[1], game.__mod_info.version[2], game.__mod_info.version[3]) },
{ game = string.format("%s %d.%d.%d%s", game.__mod_info.long_name, game.__mod_info.version[1], game.__mod_info.version[2], game.__mod_info.version[3], addons) },
{ name = self.name },
{ sex = self.descriptor.sex },
{ type = self.descriptor.subrace .. " " .. self.descriptor.subclass },
......
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