changeset 20:877806fb69a3

Fixed double use of var, and added reprocessing details in ALT
author df
date Sun, 25 Jan 2009 16:12:18 +0000
parents 704c878812a3
children 5ae40a1161e6
files reproctool.cgi
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/reproctool.cgi	Sun Jan 25 15:35:49 2009 +0000
+++ b/reproctool.cgi	Sun Jan 25 16:12:18 2009 +0000
@@ -84,7 +84,6 @@
 }
 
 # Inputs
-my $str_items = $cgi->param('items') or user_error('Items missing');
 my $cols = $cgi->param('cols') || 4;
 
 # Load mineral prices
@@ -160,10 +159,12 @@
     my $isk = ($trit * $ttrit) + ($pyer * $tpyer) + ($mexa * $tmexa) +
                 ($isog * $tisog) + ($nocx * $tnocx) + ($zydr * $tzydr) +
                 ($mega * $tmega) + ($morp * $tmorp);
+    my $repDetails = sprintf( "Trit=%d Py=%d Mex=%d Iso=%d Nocx=%d Zyd=%d Mega=%d Morp=%d",
+                              $ttrit, $tpyer, $tmexa, $tisog, $tnocx, $tzydr, $tmega, $tmorp );
     
     $meta = 0 unless defined $meta;
     $item = { id => $tid, name => $tname, meta => $meta, icon => $icon,
-              price => $basePrice, reprocess => $isk };
+              price => $basePrice, reprocessIsk => $isk, reprocessDetails => $repDetails };
     
     # If this item exists multiple times in the input, then they weren't stacked
     # so output it multiple times
@@ -223,7 +224,7 @@
         }
         else
         {
-            $text = $item->{reprocess};
+            $text = $item->{reprocessIsk};
         }
     }
     else
@@ -235,7 +236,7 @@
     print "<td width='64' class='item'>";
     print "<a href='$link'>" if defined $link;
     print "<img src='$img' width='64' height='64' border='1' ";
-    print   "title=\"$item->{name}\" alt=\"$item->{name}\" />";
+    print   "title=\"$item->{name}\" alt=\"$item->{name} ($item->{reprocessDetails})\" />";
     print "</a>" if defined $link;
     print "<br />";
     print "<font color='$colour'>" if defined $colour;