From 6888f487609b0407e2db6927e1ec3ef7140ee7ce Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Tue, 29 Nov 2011 00:42:36 +0000
Subject: [PATCH] Addons show up in the online charsheets

git-svn-id: http://svn.net-core.org/repos/t-engine4@4699 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/class/interface/PlayerDumpJSON.lua | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/game/modules/tome/class/interface/PlayerDumpJSON.lua b/game/modules/tome/class/interface/PlayerDumpJSON.lua
index 984167c97e..846e92315e 100644
--- a/game/modules/tome/class/interface/PlayerDumpJSON.lua
+++ b/game/modules/tome/class/interface/PlayerDumpJSON.lua
@@ -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 },
-- 
GitLab