From a1ea23683d34230e927cbfda412d917e607fb1e8 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Sat, 30 Oct 2010 23:09:35 +0300 Subject: [PATCH 1/3] Include timestamp as info for fits --- gui/shipBrowser.py | 2 +- service/fit.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/shipBrowser.py b/gui/shipBrowser.py index 1aec10104..04aa61633 100644 --- a/gui/shipBrowser.py +++ b/gui/shipBrowser.py @@ -188,7 +188,7 @@ class ShipBrowser(wx.Panel): self._stage3ShipName = shipName self._stage3Data = shipID - for ID, name in fitList: + for ID, name, timestamp in fitList: self.lpane.AddWidget(FitItem(self.lpane, ID, (shipName, name),shipID)) self.lpane.RefreshList() diff --git a/service/fit.py b/service/fit.py index b15bcc417..5cca43cda 100644 --- a/service/fit.py +++ b/service/fit.py @@ -50,7 +50,7 @@ class Fit(object): fits = eos.db.getFitsWithShip(id) names = [] for fit in fits: - names.append((fit.ID, fit.name)) + names.append((fit.ID, fit.name, fit.timestamp)) return names From f6932bc5358d6b75d838165733f00be77aca2316 Mon Sep 17 00:00:00 2001 From: Corollax Date: Sat, 30 Oct 2010 15:16:55 -0500 Subject: [PATCH 2/3] Tentative update to market.py Moves limited edition ships to their own category --- service/market.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/service/market.py b/service/market.py index 6c2eac222..f2abda1d3 100644 --- a/service/market.py +++ b/service/market.py @@ -113,7 +113,7 @@ class SearchWorkerThread(threading.Thread): class Market(): instance = None - FORCED_SHIPS = ("Freki", "Mimir", "Utu", "Adrestia", "Ibis", "Impairor", "Velator", "Reaper") + FORCED_SHIPS = ("Ibis", "Impairor", "Velator", "Reaper") FORCED_GROUPS = ("Rookie ship",) META_MAP = {"normal": (1, 2, 14), "faction": (4, 3), @@ -161,18 +161,27 @@ class Market(): def getShipRoot(self): cat = eos.db.getCategory(6) - root = [] + root = [(-1, "Limited Issue Ships")] for grp in cat.groups: - if grp.published or grp.name in self.FORCED_GROUPS: + if grp.published or grp.name in self.FORCED_GROUPS: root.append((grp.ID, grp.name)) return root + + LIMITED_EDITION = ("Gold Magnate", "Silver Magnate", "Guardian-Vexor", "Opux Luxury Yacht", "Armageddon Imperial Issue", "Apocalypse Imperial Issue", "Raven State Issue", "Megathron Federate Issue", "Tempest Tribal Issue", "Apotheosis", "Zephyr", "Primae", "Mimir", "Freki", "Adrestia", "Utu") def getShipList(self, id): ships = [] + if id == -1: + for name in self.LIMITED_EDITION: + item = eos.db.getItem(name) + ships.append((item.ID, item.name, item.race)) + + return ships + grp = eos.db.getGroup(id, eager=("items", "items.marketGroup", "items.attributes")) for item in grp.items: - if item.published or item.name in self.FORCED_SHIPS: + if (item.published or item.name in self.FORCED_SHIPS) and item.name not in self.LIMITED_EDITION: ships.append((item.ID, item.name, item.race)) return ships From 83158f9d294a0fdd3aea455a7e1af72adb724976 Mon Sep 17 00:00:00 2001 From: Corollax Date: Sat, 30 Oct 2010 15:19:27 -0500 Subject: [PATCH 3/3] Small formatting changes to market.py Moved a tuple to multiple lines --- service/market.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/service/market.py b/service/market.py index f2abda1d3..7152a33ee 100644 --- a/service/market.py +++ b/service/market.py @@ -114,7 +114,7 @@ class SearchWorkerThread(threading.Thread): class Market(): instance = None FORCED_SHIPS = ("Ibis", "Impairor", "Velator", "Reaper") - FORCED_GROUPS = ("Rookie ship",) + FORCED_GROUPS = ("Rookie ship") META_MAP = {"normal": (1, 2, 14), "faction": (4, 3), "complex": (6,), @@ -169,7 +169,12 @@ class Market(): return root - LIMITED_EDITION = ("Gold Magnate", "Silver Magnate", "Guardian-Vexor", "Opux Luxury Yacht", "Armageddon Imperial Issue", "Apocalypse Imperial Issue", "Raven State Issue", "Megathron Federate Issue", "Tempest Tribal Issue", "Apotheosis", "Zephyr", "Primae", "Mimir", "Freki", "Adrestia", "Utu") + LIMITED_EDITION = ("Gold Magnate", "Silver Magnate", "Guardian-Vexor", + "Opux Luxury Yacht", "Armageddon Imperial Issue", + "Apocalypse Imperial Issue", "Raven State Issue", + "Megathron Federate Issue", "Tempest Tribal Issue", + "Apotheosis", "Zephyr", "Primae", "Mimir", "Freki", + "Adrestia", "Utu") def getShipList(self, id): ships = [] if id == -1: