]> ruin.nu Git - ndwebbie.git/blobdiff - intel.pl
minor things
[ndwebbie.git] / intel.pl
index 65f847a46921823807a09f90eed602c74c95f12c..90498c29dd5307b56cfe8af6e2779956f59f3153 100644 (file)
--- a/intel.pl
+++ b/intel.pl
@@ -136,12 +136,15 @@ if ($planet){
        $query->execute($planet->{id}) or $error .= $DBH->errstr;
        my @intellists;
        my @intel;
+       my $i = 0;
        while (my $intel = $query->fetchrow_hashref){
                if ($intel->{ingal}){
                        $intel->{missionclass} = 'ingal';
                }else{
                        $intel->{missionclass} = $intel->{mission};
                }
+               $i++;
+               $intel->{ODD} = $i % 2;
                push @intel,$intel;
        }
        push @intellists,{Message => 'Incoming fleets', Intel => \@intel, Origin => 1};
@@ -149,12 +152,15 @@ if ($planet){
        my $query = $DBH->prepare(intelquery('t.alliance AS talliance,coords(t.x,t.y,t.z) AS target',"o.id = ? $showticks"));
        $query->execute($planet->{id}) or $error .= $DBH->errstr;
        my @intel;
+       my $i = 0;
        while (my $intel = $query->fetchrow_hashref){
                if ($intel->{ingal}){
                        $intel->{missionclass} = 'ingal';
                }else{
                        $intel->{missionclass} = $intel->{mission};
                }
+               $i++;
+               $intel->{ODD} = $i % 2;
                push @intel,$intel;
        }
        push @intellists,{Message => 'Outgoing Fleets', Intel => \@intel, Target => 1};
@@ -171,12 +177,15 @@ if ($planet){
 
        my @intellists;
        my @intel;
+       my $i = 0;
        while (my $intel = $query->fetchrow_hashref){
                if ($intel->{ingal}){
                        $intel->{missionclass} = 'ingal';
                }else{
                        $intel->{missionclass} = $intel->{mission};
                }
+               $i++;
+               $intel->{ODD} = $i % 2;
                push @intel,$intel;
        }
        push @intellists,{Message => q{Intel where alliances doesn't match}, Intel => \@intel, Origin => 1, Target => 1};