Skip to content

Instantly share code, notes, and snippets.

@warmist
Created May 24, 2012 21:25
Show Gist options
  • Save warmist/2784329 to your computer and use it in GitHub Desktop.
Save warmist/2784329 to your computer and use it in GitHub Desktop.
experminetal companion list extraction
function getCompanions()
local ret={}
local adv=df.global.world.units.active[0]
for k,v in pairs(df.global.world.units.active) do
if v.relations.group_leader_id==adv.id then
table.insert(ret,v)
end
end
return ret
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment