fix whitespace

PSA:  do not assume that it's the same as last time you checked.
develop
Peridexis Errant 2015-02-12 16:14:25 +11:00
parent f67370b817
commit 74476bcd95
1 changed files with 49 additions and 56 deletions

@ -74,7 +74,6 @@ function export_more_legends_xml()
local date_str = year_str..string.format('-%02d-%02d', month, day)
io.output(tostring(df.global.world.cur_savegame.save_dir).."-"..date_str.."-legends_plus.xml")
--io.output(tostring(df.global.world.cur_savegame.save_dir).."-legends_plus.xml")
io.write ("<?xml version=\"1.0\" encoding='UTF-8'?>".."\n")
io.write ("<df_world>".."\n")
@ -128,7 +127,6 @@ function export_more_legends_xml()
end
io.write ("\t\t".."</structures>".."\n")
end
end
io.write ("\t".."</site>".."\n")
end
@ -163,7 +161,6 @@ function export_more_legends_xml()
if (table.containskey(artifactV.item,"description")) then
io.write ("\t\t".."<item_description>"..artifactV.item.description:lower().."</item_description>".."\n")
end
if (artifactV.item:getMaterial() ~= -1 and artifactV.item:getMaterialIndex() ~= -1) then
io.write ("\t\t".."<mat>"..dfhack.matinfo.toString(dfhack.matinfo.decode(artifactV.item:getMaterial(), artifactV.item:getMaterialIndex())).."</mat>".."\n")
end
@ -171,8 +168,7 @@ function export_more_legends_xml()
end
io.write ("</artifacts>".."\n")
io.write ("<historical_figures>".."\n")
io.write ("</historical_figures>".."\n")
io.write ("<historical_figures>".."\n".."</historical_figures>".."\n")
io.write ("<entity_populations>".."\n")
for entityPopK, entityPopV in ipairs(df.global.world.entity_populations) do
@ -386,7 +382,6 @@ function export_more_legends_xml()
for detailK,detailV in pairs(v) do
io.write ("\t\t".."<"..k..">"..(df.global.world.raws.creatures.all[detailV].creature_id):lower().."</"..k..">".."\n")
end
elseif event:getType() == df.history_event_type.BODY_ABUSED and (k == "props") then
io.write ("\t\t".."<"..k.."_item_type"..">"..tostring(df.item_type[event.props.item.item_type]):lower().."</"..k.."_item_type"..">".."\n")
io.write ("\t\t".."<"..k.."_item_subtype"..">"..getItemSubTypeName(event.props.item.item_type,event.props.item.item_subtype).."</"..k.."_item_subtype"..">".."\n")
@ -433,7 +428,6 @@ function export_more_legends_xml()
io.write ("\t\t".."<secret_text>"..df.global.world.raws.interactions[v].str[2].value.."</secret_text>".."\n")
elseif event:getType() == df.history_event_type.HIST_FIGURE_DIED and k == "weapon" then
for detailK,detailV in pairs(v) do
if (detailK == "item") then
if detailV > -1 then
io.write ("\t\t".."<"..detailK..">"..detailV.."</"..detailK..">".."\n")
@ -492,9 +486,9 @@ function export_more_legends_xml()
io.write ("\t\t".."<shooter_mat>"..dfhack.matinfo.toString(dfhack.matinfo.decode(event.weapon.shooter_mattype, event.weapon.shooter_matindex)).."</shooter_mat>".."\n")
end
elseif (detailK == "shooter_matindex") then
--skip
elseif detailK == "slayer_race" or detailK == "slayer_caste" then
--skip
else
io.write ("\t\t".."<"..detailK..">"..detailV.."</"..detailK..">".."\n")
end
@ -506,7 +500,6 @@ function export_more_legends_xml()
else
io.write ("\t\t".."<"..k..">"..tostring(v).."</"..k..">".."\n")
end
end
io.write ("\t".."</historical_event>".."\n")
end