X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/85cf1cbebe994484740a5471565f5859c49106c2..1de61e5745ecf3dd1a41e1e932bae2f7568353a4:/sc.plp diff --git a/sc.plp b/sc.plp index 5607a9a..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', @@ -18,6 +19,7 @@ Html({ reference software attributes properties '], stylesheet => [qw'light'], + raw => '', data => [$datafile], }); @@ -29,112 +31,6 @@ Unit properties as seen or measured in Brood War version≥1.08.

- - <: sub coltoggle { my ($name, $id) = @_; @@ -337,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), ); }