X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/108d13f833e9daeff4ea1552e2e1bee1e0ed8c22..8906eed99fd6e7be8f39bd77dcde3effa29e50df:/sc.plp diff --git a/sc.plp b/sc.plp index b5d81ec..3437f8f 100644 --- a/sc.plp +++ b/sc.plp @@ -49,8 +49,8 @@ my $patch = shift @{$units} say "

Unit properties as seen or measured in $scver{name}\n$patch."; say "Also see the $_ table." for join(', ', - ('StarCraft 2: HotS') x ($scver{major} < 2), - ('original SC: Brood War') x ($scver{major} > 1), + (showlink('StarCraft 2: HotS', '/sc/2')) x ($scver{major} < 2), + (showlink('original SC: Brood War', '/sc')) x ($scver{major} > 1), ); say "

\n"; @@ -85,11 +85,9 @@ for my $unit (@{$units}) { sub coltoggle { my ($name, $id, $nolink) = @_; - return sprintf( - (defined $get{order} ? $get{order} eq $id : !$id) ? '%2$s ▼' - : $nolink ? '%2$s' : '%s', - $id && "order=$id", $name - ); + return "$name ▼" if defined $get{order} ? $get{order} eq $id : !$id; + return $name if $nolink; + return showlink($name, '?'.($id && "order=$id")); } :>