]> ruin.nu Git - ndwebbie.git/blobdiff - ND/Web/Pages/Raids.pm
color code for bash limit
[ndwebbie.git] / ND / Web / Pages / Raids.pm
index c46571288cd3c836d8135ebdcb9e7506fe91b5dd..cb2a7ed0d06639215b6ea0d24f046e8ebbbbc3ef 100644 (file)
@@ -224,7 +224,7 @@ sub render_body {
                        $target{comment} = parseMarkup($target->{comment}) if ($target->{comment});
 
                        my $scans = $DBH->prepare(q{SELECT DISTINCT ON (type) type, tick, scan FROM scans 
-                               WHERE planet = ? AND type ~ 'Unit|Planet|Military|.* Analysis' AND tick + 24 > tick() AND scan is not null
+                               WHERE planet = ? AND type ~ 'Unit|Planet|Advanced Unit|.* Analysis' AND tick + 24 > tick() AND scan is not null
                                GROUP BY type, tick, scan ORDER BY type ,tick DESC});
                        $scans->execute($target->{planet});
                        my %scans;
@@ -233,7 +233,7 @@ sub render_body {
                        }
 
                        my @scans;
-                       for my $type ('Planet','Unit','Military','Surface Analysis','Technology Analysis'){
+                       for my $type ('Planet','Unit','Advanced Unit','Surface Analysis','Technology Analysis'){
                                next unless exists $scans{$type};
                                my $scan = $scans{$type};
                                if ($self->{TICK} - $scan->{tick} > 5){
@@ -251,6 +251,8 @@ sub render_body {
                                if ($planet->{x} == $target->{x}){
                                        $target{style} = 'incluster';
                                }
+                               $target{ScoreBash} = 'bash' if ($target->{score}/$planet->{score} < 0.4);
+                               $target{ValueBash} = 'bash' if ($target->{value}/$planet->{value} < 0.4);
                        }
 
                        my @roids;