fixed bug in !lc org <name>
This commit is contained in:
@@ -122,8 +122,7 @@ class LandController:
|
|||||||
blob = ""
|
blob = ""
|
||||||
ql = 0
|
ql = 0
|
||||||
for x in data:
|
for x in data:
|
||||||
blob += f"<pagebreak>{self.format_site_info(x, time.time(), len(data))}"
|
blob += f"<pagebreak>{self.format_site_info(x, time.time(), len(data))}\n"
|
||||||
blob += f"<tab>Dist: <highlight>{x.guard}</highlight> Conductors and <highlight>{x.turrets}</highlight> Turrets planted\n\n"
|
|
||||||
ql += x.ql
|
ql += x.ql
|
||||||
blob += f"Stats: QL<highlight>{ql}</highlight>, contracts up to QL<highlight>{ql * 2}</highlight>"
|
blob += f"Stats: QL<highlight>{ql}</highlight>, contracts up to QL<highlight>{ql * 2}</highlight>"
|
||||||
return ChatBlob(f"Sites owned by {result}", blob)
|
return ChatBlob(f"Sites owned by {result}", blob)
|
||||||
@@ -218,7 +217,7 @@ class LandController:
|
|||||||
blob += "\n Towers:\n"
|
blob += "\n Towers:\n"
|
||||||
blob += towers
|
blob += towers
|
||||||
else:
|
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:
|
else:
|
||||||
if not row.enabled:
|
if not row.enabled:
|
||||||
@@ -285,7 +284,7 @@ class LandController:
|
|||||||
|
|
||||||
def get_towers_by_org(self, org_id):
|
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,
|
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 aodb b ON a.high_id = b.highid
|
||||||
LEFT JOIN playfields c on a.pf_id = c.id
|
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
|
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