Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapted to named field #135

Merged
merged 2 commits into from
Mar 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions exportlegends.lua
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ function export_more_legends_xml()
end
file:write("\t\t<type>"..(df_enums.historical_entity_type[entityV.type]):lower().."</type>\n")
if entityV.type == df.historical_entity_type.Religion then -- Get worshipped figure
if (entityV.unknown1b ~= nil and entityV.unknown1b.worship ~= nil) then
for k,v in pairs(entityV.unknown1b.worship) do
if (entityV.relations ~= nil and entityV.relations.worship ~= nil) then
for k,v in pairs(entityV.relations.worship) do
file:write("\t\t<worship_id>"..v.."</worship_id>\n")
end
end
Expand Down Expand Up @@ -565,7 +565,8 @@ function export_more_legends_xml()
df.history_event_artifact_claim_formedst:is_instance(event) or
df.history_event_artifact_givenst:is_instance(event) or
df.history_event_entity_dissolvedst:is_instance(event) or
df.history_event_item_stolenst:is_instance(event)) and k == "circumstance" then
df.history_event_item_stolenst:is_instance(event) or
df.history_event_artifact_createdst:is_instance(event)) and k == "circumstance" then
file:write("\t\t<circumstance>\n")
file:write("\t\t\t<type>"..event.circumstance.type.."</type>\n")
if event.circumstance.type == df.unit_thought_type.Death then
Expand All @@ -590,7 +591,8 @@ function export_more_legends_xml()
df.history_event_artifact_claim_formedst:is_instance(event) or
df.history_event_artifact_givenst:is_instance(event) or
df.history_event_entity_dissolvedst:is_instance(event) or
df.history_event_item_stolenst:is_instance(event)) and k == "reason" then
df.history_event_item_stolenst:is_instance(event) or
df.history_event_artifact_createdst:is_instance(event)) and k == "reason" then
file:write("\t\t<reason>\n")
file:write("\t\t\t<type>"..df.history_event_reason[event.reason.type].."</type>\n")
if event.reason.type == df.history_event_reason.glorify_hf then
Expand Down