X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/3b6982ba552c02daa4de8489e90f90a274ea14fa..1de61e5745ecf3dd1a41e1e932bae2f7568353a4:/sc.plp diff --git a/sc.plp b/sc.plp index 4706bbf..55dbd09 100644 --- a/sc.plp +++ b/sc.plp @@ -1,9 +1,10 @@ <(common.inc.plp)><: -my $datafile = 'sc-units.inc.pl'; +my $scver = 'bw'; if ($ENV{PATH_INFO} and $ENV{PATH_INFO} eq '/2') { - $datafile = 'sc2-units.inc.pl'; + my $scver = 'hots'; } +my $datafile = "sc-units-$scver.inc.pl"; Html({ title => 'starcraft unit cheat sheet', @@ -232,17 +233,15 @@ sub showval { print( '', - sprintf('%s', - $cat ne $_->{cat} ? ('h', $cat = $_->{cat}) : ('d', ' ') - ), - '' . $_->{name}, + '', $cat ne $_->{cat} && ($cat = $_->{cat}), + '', $_->{name}, showunitcols($_), ); for my $subrow (@{ $_->{special} }) { $subrow->{alt} or next; print( - '' . $subrow->{alt}, + '', $subrow->{alt}, showunitcols($subrow), ); }