]> ruin.nu Git - ndwebbie.git/commitdiff
Some raid tweaks
authorMichael Andreen <harv@ruin.nu>
Tue, 25 Aug 2020 10:42:20 +0000 (12:42 +0200)
committerMichael Andreen <harv@ruin.nu>
Tue, 25 Aug 2020 10:42:20 +0000 (12:42 +0200)
lib/NDWeb/Controller/Raids.pm
root/src/raids/view.tt2

index ae9c7a61a7c8eb4a632dcbcb62785741edb75106..998f3293386b4235526708777bba59d6afb6b665 100644 (file)
@@ -114,7 +114,7 @@ sub view : Local {
        $c->stash(message => parseMarkup($raid->{message}));
        $c->stash(landingtick => $raid->{tick});
        my $targetquery = $dbh->prepare(q{SELECT r.id, pid AS planet, size, score, value
-               , p.x,p.y,p.z, race
+               , p.pid, p.x,p.y,p.z, race
                , p.value - p.size*200 -
                        COALESCE(ps.metal+ps.crystal+ps.eonium,0)/150 -
                        COALESCE(ds.total ,(SELECT
@@ -136,9 +136,9 @@ sub view : Local {
        my @targets;
        while (my $target = $targetquery->fetchrow_hashref){
                if ($planet && $planet->{x}){
-                       if ($planet->{x} == $target->{x}){
-                               $target->{style} = 'incluster';
-                       }
+                       #if ($planet->{x} == $target->{x}){
+                       #       $target->{style} = 'incluster';
+                       #}
                        $target->{cap} = min(0.25,0.25 * pow($target->{value}/$planet->{value} , 0.5));
                        $target->{scorebash} = 'bash' if ($target->{score}/$planet->{score} < 0.6);
                        $target->{valuebash} = 'bash' if ($target->{value}/$planet->{value} < 0.4);
index 826ac606190abc7dff8d8dd7b6be26e770753ba8..6d8f1908b35ab3c31a915188a6395efcc3c89a0d 100644 (file)
@@ -3,7 +3,7 @@
 <fieldset> <legend>Message</legend>
        <p><b>REMEMBER TO PASTE LAUNCH CONFIRMATION IF YOU WANT AN ATTACK POINT</b></p>
        <p><b style="color: red;">DO NOT JOIN A WAVE UNLESS YOU HAVE PERMISSION FROM THE PERSON WHO CLAIMED IT</b></p>
-       <p><b style="color: purple;">COORDS ARE NOT SHOWN UNTIL AT LEAST 10 MIN AFTER YOUR CLAIM</b></p>
+       <p><b style="color: purple;">TARGETS IN YOUR GALAXY ARE NOT SHOWN</b></p>
        <p>Landing tick first wave: [% landingtick %]</p>
        [% message %]
 </fieldset>
@@ -24,7 +24,7 @@
        <div class="leftinfo"><ul>
                <li><a href="[% c.uri_for('targetcalc',t.id) %]" rel="external">Calc</a></li>
                [% IF raid.released_coords %]
-               <li>Coords: [% t.x %]:[% t.y %]:[% t.z %]</li>
+               <li>Coords: <a href="[% c.uri_for('/stats/planet',t.pid) %]">[% t.x %]:[% t.y %]:[% t.z %]</a></li>
                [% END %]
                <li>Size: [% t.size %]</li>
                <li class="[% t.scorebash %]">Score: [% t.score %]</li>