X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=ND%2FWeb%2FPages%2FRaids.pm;h=cb2a7ed0d06639215b6ea0d24f046e8ebbbbc3ef;hb=992f6c4b397788444f725b071bb1887e878a46da;hp=2c49a1a76cc5e4e766f1f91d28e0d43fc044f8f0;hpb=10ace39e7c4d85a47236e097f7addb6056a3dc38;p=ndwebbie.git diff --git a/ND/Web/Pages/Raids.pm b/ND/Web/Pages/Raids.pm index 2c49a1a..cb2a7ed 100644 --- a/ND/Web/Pages/Raids.pm +++ b/ND/Web/Pages/Raids.pm @@ -19,7 +19,7 @@ package ND::Web::Pages::Raids; use strict; -use warnings FATAL => 'all'; +use warnings; use ND::Include; use POSIX; use CGI qw/:standard/; @@ -178,7 +178,7 @@ sub render_body { return $self->generateClaimXml($BODY,$raid,$from); } if ($self->{XML} && param('cmd') eq 'gettargets' ){ - $_ = listTargets(); + $_ = $self->listTargets(); $BODY->param(TargetList => $_); } @@ -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() + 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,11 +233,11 @@ 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){ - $scan->{scan} =~ s{}{}; + $scan->{scan} =~ s{}{}; } if ($type eq 'Planet'){ $target{PlanetScan} = $scan->{scan}; @@ -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;