# HG changeset patch # User John@Yosemite-PC # Date 1332386586 14400 # Node ID b155a875de4267569b4e8a97015594e4eec640cf # Parent f52d472f0b0a2bc114eee7cae398cfa3d51b23d2 Some API updates diff -r f52d472f0b0a -r b155a875de42 Lists.lua --- a/Lists.lua Wed Mar 21 22:52:42 2012 -0400 +++ b/Lists.lua Wed Mar 21 23:23:06 2012 -0400 @@ -116,6 +116,12 @@ self.id = newId return temp end +function ListEntry:GetClass() -- todo: consider if this is ok + return PersonList:Select(self.id):GetClass() +end +function ListEntry:GetName() -- todo: consider if this is ok + return PersonList:Select(self.id):GetName() +end List = { @@ -243,6 +249,9 @@ local listIndex = self:GetId() return InitiateChange("InsertEntry",self,{listIndex=listIndex,id=id,roll=index}) end +function List:GetLength() + return #self.data +end function List:OrderedListEntryIter() local i = 0 local n = #self.data @@ -382,6 +391,7 @@ end end end +-- todo: iterator for lists ... it's pretty necessary Toon = { @@ -523,7 +533,7 @@ end end -- todo: remove reserve -function PersonList:IsActive(id) +function PersonList:IsActive(id) -- todo: support LE as input - saves IsActive(le:GetId()) return self.active.raid[id] or self.active.reserve[id] end function PersonList:AddMissing()