fixed bug in !lc org <name>
This commit is contained in:
@@ -122,8 +122,7 @@ class LandController:
|
||||
blob = ""
|
||||
ql = 0
|
||||
for x in data:
|
||||
blob += f"<pagebreak>{self.format_site_info(x, time.time(), len(data))}"
|
||||
blob += f"<tab>Dist: <highlight>{x.guard}</highlight> Conductors and <highlight>{x.turrets}</highlight> Turrets planted\n\n"
|
||||
blob += f"<pagebreak>{self.format_site_info(x, time.time(), len(data))}\n"
|
||||
ql += x.ql
|
||||
blob += f"Stats: QL<highlight>{ql}</highlight>, contracts up to QL<highlight>{ql * 2}</highlight>"
|
||||
return ChatBlob(f"Sites owned by {result}", blob)
|
||||
@@ -218,7 +217,7 @@ class LandController:
|
||||
blob += "\n Towers:\n"
|
||||
blob += towers
|
||||
else:
|
||||
blob += f"<tab>Dist: <highlight>{data.guards}</highlight> Conductors and <highlight>{data.turrets}</highlight> Turrets\n"
|
||||
blob += f"<tab>Dist: <highlight>{row.guards}</highlight> Conductors and <highlight>{row.turrets}</highlight> Turrets\n"
|
||||
|
||||
else:
|
||||
if not row.enabled:
|
||||
@@ -285,7 +284,7 @@ class LandController:
|
||||
|
||||
def get_towers_by_org(self, org_id):
|
||||
return self.db.query("""SELECT * FROM (SELECT COUNT(CASE WHEN name LIKE '%Turret%' THEN 1 WHEN name LIKE '%SAM Battery%' THEN 1 END) turrets,
|
||||
COUNT(CASE WHEN name LIKE '%Guard%' THEN 1 END) guard, a.pf_id, a.org_id, e.org_name, c.*, d.* FROM towers a
|
||||
COUNT(CASE WHEN name LIKE '%Guard%' THEN 1 END) guards, a.pf_id, a.org_id, e.org_name, c.*, d.* FROM towers a
|
||||
LEFT JOIN aodb b ON a.high_id = b.highid
|
||||
LEFT JOIN playfields c on a.pf_id = c.id
|
||||
LEFT JOIN tower_sites d on a.pf_id = d.playfield_id and a.site_number = d.site_number
|
||||
|
||||
Reference in New Issue
Block a user