X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=NDWeb%2FPages%2FRaids.pm;h=31be782d6b6000cb8efcdd66cf7faf29ebf71ace;hb=f6368f63a2934e3203babc87818e54714ec336d7;hp=2382a8fed360ac0503ca26f7da1123f6433afc2f;hpb=1ac7abba88180254eaf3a65e1aded1c6d7c42576;p=ndwebbie.git diff --git a/NDWeb/Pages/Raids.pm b/NDWeb/Pages/Raids.pm index 2382a8f..31be782 100644 --- a/NDWeb/Pages/Raids.pm +++ b/NDWeb/Pages/Raids.pm @@ -205,6 +205,7 @@ sub render_body { COALESCE(avg(total),0) FROM structure_scans)::int)*1500 AS fleetvalue ,(metal+crystal+eonium)/100 AS resvalue, comment + , hidden, light, medium, heavy FROM current_planet_stats p JOIN raid_targets r ON p.id = r.planet LEFT OUTER JOIN planet_scans ps ON p.id = ps.planet @@ -214,6 +215,7 @@ sub render_body { ORDER BY size}); $targetquery->execute($raid->{id}); my @targets; + my %production = (0 => 'None', 35 => 'Light', 65 => 'Medium', 100 => 'High'); while (my $target = $targetquery->fetchrow_hashref){ my %target; if ($planet){ @@ -239,6 +241,11 @@ sub render_body { $target{ResValue} = floor($target->{resvalue}/$num)*$num; } $target{comment} = parseMarkup($target->{comment}) if ($target->{comment}); + + $target{Hidden} = int($target->{hidden} / 100); + $target{Light} = $production{$target->{light}}; + $target{Medium} = $production{$target->{medium}}; + $target{Heavy} = $production{$target->{heavy}}; my $unitscans = $DBH->prepare(q{ SELECT DISTINCT ON (name) i.id,i.name, i.tick, i.amount