echo "<td style=\"vertical-align: top\">\n";
echo "<table>\n";
foreach ($endorsements as $e) {
- if (Entry::EndorsementHidden($e)) continue;
+ if (Entry::EndorsementHidden($e, $race->getAllottedTime())) continue;
$description = Entry::EndorsementDescription($e);
echo "<tr><td>$e</td><td>$description</td></tr>\n";
}
echo "[td]\n";
echo "[table]\n";
foreach ($endorsements as $e) {
- if (Entry::EndorsementHidden($e)) continue;
+ if (Entry::EndorsementHidden($e, $race->getAllottedTime())) continue;
$description = Entry::EndorsementDescription($e);
echo "[tr]";
echo "[td]";
*/
class Entry extends BaseEntry
{
+ /* key => (description, hidden, time limited only, value) */
private static $ENDORSEMENTS = array(
- 'c' => array('entry cut short', false, 1 << 0),
- 'd' => array('docking computer', false, 1 << 1),
- 'f' => array('FSD injection', false, 1 << 2),
- 'j' => array('joker card', false, 1 << 3),
- 'x' => array('excluded from ranking', false, 1 << 4),
- 'm' => array('missing evidence', false, 1 << 5),
- 's' => array('shields', true, 1 << 6),
- 't' => array('tuned', false, 1 << 7)
+ 'c' => array('entry cut short', false, true, 1 << 0),
+ 'd' => array('docking computer', false, false, 1 << 1),
+ 'f' => array('FSD injection', false, false, 1 << 2),
+ 'j' => array('joker card', false, false, 1 << 3),
+ 'x' => array('excluded from ranking', false, false, 1 << 4),
+ 'm' => array('missing evidence', false, false, 1 << 5),
+ 's' => array('shields', true, false, 1 << 6),
+ 't' => array('tuned', false, false, 1 << 7)
);
function Endorsements() {
return self::Endorsement($e)[0];
}
- function EndorsementHidden($e) {
- return self::Endorsement($e)[1];
+ function EndorsementTimeLimited($e) {
+ return self::Endorsement($e)[2];
+ }
+
+ function EndorsementHidden($e, $time_limited = false) {
+ if (self::Endorsement($e)[1]) return true;
+ if (self::EndorsementTimeLimited($e) && ! $time_limited) return true;
+ return false;
}
function EndorsementValue($e) {
- return self::Endorsement($e)[2];
+ return self::Endorsement($e)[3];
}
function Sort($a, $b, $method, $reverse = false) {