]> ruin.nu Git - ndwebbie.git/commitdiff
Use all ships for milscan fleet amount
authorMichael Andreen <michael@andreen.dev>
Tue, 17 Jan 2023 12:41:17 +0000 (13:41 +0100)
committerMichael Andreen <michael@andreen.dev>
Tue, 17 Jan 2023 12:41:17 +0000 (13:41 +0100)
lib/NDWeb/Scans.pm

index f2661498c9d585fb638a291a9dd25372c915f2d4..87a43d183f4cb70d55cf9782898b0654a034f294 100644 (file)
@@ -40,7 +40,7 @@ sub parseMilScan ($) {
        my $total = 0;
        while ($file =~ m{<tr><td class="left">([^<]+)</td>(.+?)</tr>}g) {
                my $ship = $1;
-               next if $ship eq 'Total Ships';
+               next if $ship eq 'Total Visible Ships';
                my $amounts = $2;
                my $tot_amount = 0;
                my $i = 0;
@@ -48,7 +48,7 @@ sub parseMilScan ($) {
                        my $fleet = $fleets[$i];
                        my $amount = $1;
                        $amount =~ s/,//g;
-                       if ($ship eq 'Total Visible Ships') {
+                       if ($ship eq 'Total Ships') {
                                $fleet->{amount} = $amount;
                        } elsif ($amount > 0) {
                                $tot_amount += $amount;