changeset 271:e5c0c407b019 misc

Fix to work with the materials.pl changes.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 08 Mar 2015 08:57:55 +0200
parents f203d193963d
children ad9f04b11533
files materials/parsealloys.pl
diffstat 1 files changed, 12 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/materials/parsealloys.pl	Sun Mar 08 08:45:44 2015 +0200
+++ b/materials/parsealloys.pl	Sun Mar 08 08:57:55 2015 +0200
@@ -200,18 +200,21 @@
   foreach my $type (sort { $a cmp $b } keys %{$Materials::matByType})
   {
     my $subtotal = 0;
-    print "\n$type alloys\n".
+    print "\n".$$Materials::revTransTable{16}{$type}." alloys\n".
     "=========================================================\n";
 
-    foreach my $min1 (@{$$Materials::matByType{$type}}) {
-      foreach my $min2 (sort { $a cmp $b } keys %{$final{$min1}}) {
+    foreach my $min1 (@{$$Materials::matByType{$type}})
+    {
+      foreach my $min2 (sort { $a cmp $b } keys %{$final{$min1}})
+      {
         printf "%-35s = ", $min1." + ".$min2;
         my $n = 0;
         foreach my $res (sort { 
-          $final{$min1}{$min2}{$a} <=> $final{$min1}{$min2}{$b}
-          ||
-          $a cmp $b
-          } keys %{$final{$min1}{$min2}}) {
+            $final{$min1}{$min2}{$a} <=> $final{$min1}{$min2}{$b}
+            ||
+            $a cmp $b
+            } keys %{$final{$min1}{$min2}})
+        {
           print $res."[".$final{$min1}{$min2}{$res}."] ";
           $n++;
         }
@@ -221,8 +224,8 @@
         $subtotal++;
       }
     }
-    print "\n$subtotal $type alloys.\n\n";
+    print "\n".$subtotal." ".lc($$Materials::revTransTable{16}{$type})." type alloys.\n\n";
   }
 
-  print "\n$total alloys total.\n";
+  print "\n".$total." alloys total.\n";
 }