Skip to content

Commit

Permalink
Don't output UI Order into .prices file
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Aug 30, 2014
1 parent f08de3e commit 94b2ea7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions misc/generate_prices_from_sq3.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def main():
, Price.station_id
, Item.category_id
, Price.item_id
, Price.ui_order
, Price.sell_to
, Price.buy_from
FROM Station, Item, Price
Expand All @@ -39,7 +38,7 @@ def main():
ORDER BY Station.system_id, Station.station_id, Item.category_id, Price.ui_order, Price.item_id
""")
lastSys, lastStn, lastCat = None, None, None
for (sysID, stnID, catID, itemID, uiOrder, fromStn, toStn) in cur:
for (sysID, stnID, catID, itemID, fromStn, toStn) in cur:
system = systems[sysID]
if system is not lastSys:
if lastStn: print("\n")
Expand All @@ -58,7 +57,7 @@ def main():
print(" + {}".format(category))
lastCat = category

print(" [{:3d}] {:<{width}} {:7d} {:6d}".format(uiOrder, items[itemID], fromStn, toStn, width=longestNameLen))
print(" {:<{width}} {:7d} {:6d}".format(items[itemID], fromStn, toStn, width=longestNameLen))


if __name__ == "__main__":
Expand Down

0 comments on commit 94b2ea7

Please sign in to comment.