<%perl>
+my $maxmaxdist= $maxmaxdist[$searchtype];
if (!$emsg && $maxdist > $maxmaxdist) {
- $emsg= "Searching for routes of more than $maxmaxdist leagues is not".
- " supported, sorry.";
+ $emsg= "Searching for $searchtype_show routes".
+ " of more than $maxmaxdist leagues is not".
+ " supported, sorry.";
}
-$emsgokorprint->($emsg) or return;
-@islandids or return;
-$allargs->{'submit'} or return;
-defined $routeparams->{MaxMass} or defined $routeparams->{MaxVolume} or return;
+print("
"), return
+ unless $emsgokorprint->($emsg)
+ and @islandids
+ and $allargs->{'submit'}
+ and defined $destspec
+ and (defined $routeparams->{MaxMass} or
+ defined $routeparams->{MaxVolume});
#---------- prepare island names ----------
@@ -142,9 +181,9 @@ foreach my $k (qw(MaxMass MaxVolume MaxCapital)) {
}
push @rsargs, defined $routeparams->{LossPerLeaguePct}
? $routeparams->{LossPerLeaguePct}*0.01 : 1e-9;
-push @rsargs, '0';
+push @rsargs, $routeparams->{MinProfit};
push @rsargs, 'search',$maxdist, $maxcountea,$maxcountea;
-push @rsargs, $ARGS{RouteSearchType} ? 'circ' : 'any';
+push @rsargs, $destspec;
push @rsargs, @islandids;
m/[^-.0-9a-zA-Z]/ and die "$_ $& ?" foreach @rsargs;
@@ -226,7 +265,7 @@ if (!close $fh) {
die $! if $!;
die $? if $? != 24; # SIGXCPU but not in POSIX.pm :-/
%perl>
-
Search took too long and was terminated
+% $someresults->('Search took too long and was terminated');
Sorry, but your query resulted in a search that took too long.
Searches are limited to <% $maxcpu |h %> seconds of CPU time to
@@ -234,16 +273,17 @@ avoid them consuming excessive resources on the server system, and to
make sure that shorter searches can still happen.
-Please try a search with a smaller minimum distance, or place more
+Please try a search with a smaller maximum distance, or place more
restrictions on the route.
+
<%perl>
return;
}
if ($concur_fail) {
%perl>
-
Server too busy
+% $someresults->('Server too busy');
Sorry, but there are already <% $concur_lim |h %> route searches
running. We limit the number which can run at once to avoid
@@ -252,7 +292,7 @@ YARRG website still runs quickly.
If you submitted several searches and gave up on them (eg by hitting
-`back' or `stop' in your browser), be aware that that doesn't
+"back" or "stop" in your browser), be aware that that doesn't
generally stop the search process at the server end. So it's best to
avoid asking for large searches that you're not sure about.
@@ -260,6 +300,7 @@ avoid asking for large searches that you're not sure about.
Otherwise, please try later. Searches are limited to <% $maxcpu |h %>
seconds of CPU time so more processing resources should be available soon.
+
<%perl>
return;
}
@@ -273,7 +314,7 @@ $someresults->();
% } else {
Best routes for profit per league
% }
-
+
@@ -293,7 +334,6 @@ $someresults->();
Start
Via
Finish
-
% my $datarow=0;
% my %sortkeys;
@@ -341,11 +381,8 @@ $someresults->();
Notes
Per league values count each island visited as one
-(additional) league; the `Dist.' column is however the actual distance
+(additional) league; the "Dist." column is however the actual distance
to be sailed. All profit figures are somewhat approximate; get a
complete trading plan for a route for accurate information.
-<%perl>
-
-
-%perl>
+