X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=lib%2FNDWeb%2FController%2FCovOp.pm;h=ea67978ef9fd8037de2d9baf24d8bc1674bef33c;hb=b52c7c95096825846f53e73de627e6cda01d9bca;hp=faf4296660d9de465ec6436a44106b00b286e412;hpb=740a99f01c0ee354ec1681e8d1d5ba5bf166b724;p=ndwebbie.git diff --git a/lib/NDWeb/Controller/CovOp.pm b/lib/NDWeb/Controller/CovOp.pm index faf4296..ea67978 100644 --- a/lib/NDWeb/Controller/CovOp.pm +++ b/lib/NDWeb/Controller/CovOp.pm @@ -55,13 +55,13 @@ sub list : Private { , distorters,gov , MaxResHack,co.tick AS lastcovop FROM (SELECT p.id,coords(x,y,z),size, metal,crystal,eonium,guards - ,seccents,NULLIF(ss.total::integer,0) AS structures,distorters + ,seccents,NULLIF(ds.total::integer,0) AS structures,distorters ,max_bank_hack(metal,crystal,eonium,p.value ,(SELECT value FROM current_planet_stats WHERE id = ?)) AS MaxResHack , planet_status, relationship,gov FROM current_planet_stats p LEFT OUTER JOIN current_planet_scans ps ON p.id = ps.planet - LEFT OUTER JOIN current_structure_scans ss ON p.id = ss.planet + LEFT OUTER JOIN current_development_scans ds ON p.id = ds.planet ) AS foo LEFT OUTER JOIN (SELECT id,max(tick) AS tick FROM covop_attacks GROUP BY id) co USING (id) WHERE (metal IS NOT NULL OR seccents IS NOT NULL)