Mercurial > hg > batmud > misc
changeset 153:fd57384798a0 misc
Bugfixes.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 21 Dec 2010 23:24:35 +0000 |
parents | 330ec9a42ae0 |
children | 407e55d83f68 |
files | materials/alloy.php materials/parsealloys.pl |
diffstat | 2 files changed, 3 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/materials/alloy.php Tue Dec 21 23:05:26 2010 +0000 +++ b/materials/alloy.php Tue Dec 21 23:24:35 2010 +0000 @@ -116,6 +116,7 @@ echo "<h2>".$showMatName."</h2>\n". "<table width=\"95%\">\n". "<tr>"; + $n = 0; foreach ($matTable[$showMat] as $key => $val) { echo "<th>".htmlentities($transNameTable[$key+1])."</th><td>";
--- a/materials/parsealloys.pl Tue Dec 21 23:05:26 2010 +0000 +++ b/materials/parsealloys.pl Tue Dec 21 23:24:35 2010 +0000 @@ -17,7 +17,7 @@ my $mode = shift or die("Usage: $0 <-php|-text>\n"); if ($mode eq "-php") { -# $domark = 1; + $domark = 1; } elsif ($mode eq "-text") { } else { @@ -70,16 +70,7 @@ my %seen = (); foreach my $mat (@tmp) { $seen{$mat}++; } if ($domark) { - my $n = -1; - my $mult = 0; - my $res = ""; - foreach my $mat (keys %seen) { - $res = $mat; - $mult++; - } - if ($mult > 1) { $res .= " (uns)"; } - $final{$min1}{$min2} = $res; - $final{$min2}{$min1} = $res; + $final{$min1}{$min2} = $final{$min2}{$min1} = \%seen; } else { # print STDERR "$min1 : $min2 == "; foreach my $a (keys %seen) { print STDERR "$a=$seen{$a}, "; } print STDERR "\n"; if ($min1 lt $min2) {