summaryrefslogtreecommitdiffstats
path: root/db/queries.py
diff options
context:
space:
mode:
authorraylu <raylu@gridium.com>2013-10-23 01:16:34 -0700
committerraylu <raylu@gridium.com>2013-10-23 01:16:34 -0700
commited59e1b3c6ebf1b4fb114264db19b7b21eb54468 (patch)
tree97ee67ba01da8f9e9e0a1cfb25eabf3917e00558 /db/queries.py
parent719c83e23485ef7caefbc574c23ba91a2e661ce8 (diff)
downloadykill-ed59e1b3c6ebf1b4fb114264db19b7b21eb54468.tar.xz
ship as item on kill, hide cents
also, set height on kill page so loading images doesn't adjust heights and fix firefox kill_list ellipsis
Diffstat (limited to 'db/queries.py')
-rw-r--r--db/queries.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/db/queries.py b/db/queries.py
index a4605e8..a1963bf 100644
--- a/db/queries.py
+++ b/db/queries.py
@@ -92,6 +92,13 @@ def kill(kill_id):
else:
attackers.append(char)
+ try:
+ ship_cost = db.get(c, 'SELECT cost FROM item_costs WHERE type_id = ?',
+ victim['ship_type_id'])
+ victim['ship_cost'] = ship_cost['cost']
+ except db.NoRowsException:
+ victim['ship_cost'] = 0
+
item_rows = db.query(c, '''
SELECT items.type_id, flag, dropped, destroyed, singleton,
cost, typeName AS item_name, capacity
@@ -169,8 +176,6 @@ def top_cost():
ORDER BY cost DESC
LIMIT 25
''')
- #for kill in kills:
- # kill['kill_time'] = _format_kill_time(kill['kill_time'])
return kills
def _format_kill_time(kill_time):