comparison materials/info.php @ 331:7e6ca29133bb misc

Show full mix "formula" if there are no known alloy combos.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 31 Dec 2015 03:05:39 +0200
parents 27356bea526a
children d6a03237017f
comparison
equal deleted inserted replaced
330:27356bea526a 331:7e6ca29133bb
252 { 252 {
253 // 253 //
254 // No alloy combos known, show "generic" formula 254 // No alloy combos known, show "generic" formula
255 // 255 //
256 echo "<p>No known alloy combinations.</p>\n"; 256 echo "<p>No known alloy combinations.</p>\n";
257 } 257
258 258 $typeMats = [];
259 /* 259 foreach ($matDataTable as $name => $data)
260 $typeMats = []; 260 {
261 foreach ($matDataTable as $name => $data) 261 if ($data[14] == $matDataTable[$setShowMat][14] && $name != $setShowMat)
262 { 262 $typeMats[] = $name;
263 if ($data[14] == $matDataTable[$setShowMat][14] && $name != $setShowMat) 263 }
264 $typeMats[] = $name; 264
265 } 265 echo "<p>Full mix: ";
266 266 if (list($a, $b) = each($typeMats))
267 echo "<p>Full mix: "; 267 echo stGetMatLink($b);
268 if (list($a, $b) = each($typeMats)) 268
269 echo stGetMatLink($b); 269 while (list($a, $b) = each($typeMats))
270 270 echo " <b>+</b> ".stGetMatLink($b);
271 while (list($a, $b) = each($typeMats)) 271 echo "</p>\n";
272 echo " <b>+</b> ".stGetMatLink($b); 272 }
273 echo "</p>\n";
274 */
275 273
276 // 274 //
277 // Show mix table for this material 275 // Show mix table for this material
278 // 276 //
279 echo "<h3>Mixtable</h3>\n"; 277 echo "<h3>Mixtable</h3>\n";