From 8ad71aae623e8b4935fa5e78e462478d477d3a94 Mon Sep 17 00:00:00 2001 From: Robert Janetzko Date: Tue, 12 Jan 2016 14:59:13 +0100 Subject: [PATCH] export contents of scrolls and books --- scripts/exportlegends.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/exportlegends.lua b/scripts/exportlegends.lua index 952accf8e..a7c6ca2ca 100644 --- a/scripts/exportlegends.lua +++ b/scripts/exportlegends.lua @@ -188,6 +188,18 @@ function export_more_legends_xml() if (artifactV.item:getSubtype() ~= -1) then file:write("\t\t"..artifactV.item.subtype.name.."\n") end + for improvementK,impovementV in pairs(artifactV.item.improvements) do + if impovementV:getType() == df.improvement_type.WRITING then + for writingk,writingV in pairs(impovementV["itemimprovement_writingst.anon_1"]) do + file:write("\t\t"..writingV.."\n") + end + elseif impovementV:getType() == df.improvement_type.PAGES then + file:write("\t\t"..impovementV.count.."\n") + for writingk,writingV in pairs(impovementV.contents) do + file:write("\t\t"..writingV.."\n") + end + end + end end if (table.containskey(artifactV.item,"description")) then file:write("\t\t"..dfhack.df2utf(artifactV.item.description:lower()).."\n")