Start work on the ship browser, the ship browser part is ready. Missing a fit listing and buttons to create, rename, duplicate, etc. a fit

This commit is contained in:
cncfanatics
2010-08-19 15:43:51 +02:00
parent a4f19f83bb
commit af71cdc626
16 changed files with 153 additions and 13 deletions

View File

@@ -38,7 +38,7 @@ class Market():
items = []
group = eos.db.getMarketGroup(id)
for item in group.items:
for item in group.items:
icon = item.icon.iconFile if item.icon else ""
items.append((item.ID, item.name, icon))
@@ -59,6 +59,23 @@ class Market():
return children
def getShipRoot(self):
cat = eos.db.getCategory(6)
root = []
for grp in cat.groups:
if grp.published == 1:
root.append((grp.ID, grp.name))
return root
def getShipList(self, id):
ships = []
grp = eos.db.getGroup(id)
for item in grp.items:
if item.published == 1:
ships.append((item.ID, item.name, item.race))
return ships
def getMarketRoot(self):
"""
Get the root of the market tree.
@@ -75,6 +92,6 @@ class Market():
root = []
for id in marketGroups:
mg = eos.db.getMarketGroup(id)
root.append((id, mg.name, mg.icon.iconFile))
root.append((id, mg.name, mg.icon.iconFile if mg.icon else ""))
return root