# HG changeset patch # User Matti Hamalainen # Date 1451368723 -7200 # Node ID c5e63ca351ebf958dc0a05e0d7c2606d1924aca8 # Parent 809e2a1c64ebfb77b2d57d1f867173dd832c85c8 Cleanups. diff -r 809e2a1c64eb -r c5e63ca351eb materials/info.php --- a/materials/info.php Tue Dec 29 06:30:59 2015 +0200 +++ b/materials/info.php Tue Dec 29 07:58:43 2015 +0200 @@ -76,7 +76,7 @@ td.hits20, .hits20 { background: #0c0; color: black; } td.hits10, .hits10 { background: #080; } td.hits5, .hits5 { background: #750; } - td.hits0, .hits0 { background: #420; } + td.hits0, .hits0 { background: #a00; } td.nohits, .nohits { background: black; } td.impossible { background: black; color: #f00; text-align: center; } @@ -210,37 +210,44 @@ /* $typeMats = array(); - foreach ($matDataTable as $name => $data) { + foreach ($matDataTable as $name => $data) + { if ($data[14] == $matDataTable[$setShowMat][14] && $name != $setShowMat) $typeMats[] = $name; } - echo "Full mix: "; + echo "

Full mix: "; if (list($a, $b) = each($typeMats)) echo stGetMatLink($b); while (list($a, $b) = each($typeMats)) echo " + ".stGetMatLink($b); - echo "
\n"; + echo "

\n"; */ echo "

Mixtable

\n"; if (count($alloyTable[$setShowMat]) > 0) { echo - "". - " \n". - " \n"; + "
+
". + " \n". + " \n"; + foreach ($alloyTable[$setShowMat] as $key => $value) { echo "\n"; } - echo " \n". - " "; + + echo + " \n". + " "; + foreach ($alloyTable[$setShowMat] as $key => $value) - if (list($a, $b) = each($value)) { - echo ""; + if (list($a, $b) = each($value)) + { + echo ""; + } } echo "
+".stGetMatLink($key)."
".chentities($setShowMat)."
".chentities($setShowMat)."".stGetMatLink($a)."".stGetMatLink($a)."
\n"; } @@ -278,6 +285,7 @@ $currTable[$from] = $currTable[$to]; $currTable[$to] = $tmp; } + if (count($str) > 0) { echo "

Swapped rows: ".implode(", ", $str)."

\n"; @@ -343,6 +351,7 @@ } else echo "?"; + $total++; } else @@ -356,11 +365,12 @@ // // Calculate some statistics // + $researchValue /= $researched * 15.0; + if ($researchValue > 1.0) + $researchValue = 1.0; + $total /= 2; $researched /= 2; - $researchValue /= $total * 12.0; - if ($researchValue > 1.0) - $researchValue = 1.0; printf( "\n".