From 7e8200603c538d34b928a8a64e3b930bbe3b72ba Mon Sep 17 00:00:00 2001 From: lethosor Date: Tue, 13 Oct 2015 21:31:14 -0400 Subject: [PATCH] Fix whitespace --- scripts/exportlegends.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/exportlegends.lua b/scripts/exportlegends.lua index 721d793f3..7b1277b3b 100644 --- a/scripts/exportlegends.lua +++ b/scripts/exportlegends.lua @@ -397,16 +397,16 @@ function export_more_legends_xml() --io.write ("\t\t".."<"..k.."_item_mat_index"..">"..tostring(event.props.item.mat_index).."".."\n") io.write ("\t\t".."<"..k.."_pile_type"..">"..tostring(event.props.pile_type).."".."\n") elseif event:getType() == df.history_event_type.ASSUME_IDENTITY and k == "identity" then - if (table.contains(df.global.world.identities.all,v)) then - if (df.global.world.identities.all[v].histfig_id == -1) then - local thisIdentity = df.global.world.identities.all[v] - io.write ("\t\t"..""..thisIdentity.name.first_name.."".."\n") - io.write ("\t\t"..""..(df.global.world.raws.creatures.all[thisIdentity.race].creature_id):lower().."".."\n") - io.write ("\t\t"..""..(df.global.world.raws.creatures.all[thisIdentity.race].caste[thisIdentity.caste].caste_id):lower().."".."\n") - else - io.write ("\t\t"..""..df.global.world.identities.all[v].histfig_id.."".."\n") - end - end + if (table.contains(df.global.world.identities.all,v)) then + if (df.global.world.identities.all[v].histfig_id == -1) then + local thisIdentity = df.global.world.identities.all[v] + io.write ("\t\t"..""..thisIdentity.name.first_name.."".."\n") + io.write ("\t\t"..""..(df.global.world.raws.creatures.all[thisIdentity.race].creature_id):lower().."".."\n") + io.write ("\t\t"..""..(df.global.world.raws.creatures.all[thisIdentity.race].caste[thisIdentity.caste].caste_id):lower().."".."\n") + else + io.write ("\t\t"..""..df.global.world.identities.all[v].histfig_id.."".."\n") + end + end elseif event:getType() == df.history_event_type.MASTERPIECE_CREATED_ARCH_CONSTRUCT and k == "building_type" then io.write ("\t\t"..""..df.building_type[v]:lower().."".."\n") elseif event:getType() == df.history_event_type.MASTERPIECE_CREATED_ARCH_CONSTRUCT and k == "building_subtype" then @@ -560,7 +560,7 @@ function export_site_maps() local vs = dfhack.gui.getCurViewscreen() if ((dfhack.gui.getCurFocus() ~= "legends" ) and (not table.contains(vs, "main_cursor"))) then -- Using open-legends vs = vs.parent - end + end print(' Exporting: All possible site maps') vs.main_cursor = 1 gui.simulateInput(vs, 'SELECT') @@ -573,7 +573,7 @@ end -- main() if dfhack.gui.getCurFocus() == "legends" or dfhack.gui.getCurFocus() == "dfhack/lua/legends" then - -- either native legends mode, or using the open-legends.lua script + -- either native legends mode, or using the open-legends.lua script if args[1] == "all" then export_legends_info() export_site_maps()