From: Mischa POSLAWSKY Date: Mon, 22 Jun 2015 07:56:29 +0000 (+0200) Subject: sc: colourise negative supply values (providers) X-Git-Tag: v1.8~106 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/f5e535f48dc60fdcaa93b9b6ee523801448b9f82?hp=e9ee5e5e683bffd3ffef39896a2735fde7117eb1 sc: colourise negative supply values (providers) --- diff --git a/sc.css b/sc.css index 0f2bb88..17aec81 100644 --- a/sc.css +++ b/sc.css @@ -37,6 +37,9 @@ table h2 { .units td.unit + td.unit { padding-left: 0; } +.unit-supply { + color: #080; +} .unit-o {color: #C08} /* organic */ .unit-u {color: #44C} /* mechanic */ .unit-p {color: #0A8} /* psionic */ diff --git a/sc.plp b/sc.plp index e1132b8..09ae989 100644 --- a/sc.plp +++ b/sc.plp @@ -265,8 +265,9 @@ sub showrange { $_->{attr}->{massive} && '⚓', ), - '' . ( - defined $_->{pop} && $_->{pop} == .5 ? '½' : $_->{pop} + sprintf('%s', + defined $_->{pop} && $_->{pop} < 0 && ' unit-supply', + defined $_->{pop} && $_->{pop} == .5 ? '½' : $_->{pop}, ), '' . join('', grep { $_ } (defined $_->{organic} ? !$_->{organic} : $_->{attr}->{mech})