Skip to content

Instantly share code, notes, and snippets.

@Ramblurr
Created November 3, 2013 20:43
Show Gist options
  • Save Ramblurr/7294582 to your computer and use it in GitHub Desktop.
Save Ramblurr/7294582 to your computer and use it in GitHub Desktop.
for _,event in ipairs(df.global.world.history.events) do
if event:isRelatedToHistfigID(hfig.id) then
context = df.history_event_context:new()
sentence = dfhack.with_temp_object(
df.new "string",
function(str)
event:getSentence(str, context, 1, 0)
return str.value
end
)
print(sentence)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment